Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

typeahead: Simplify call to `this.source`.

evykassirer6aee4f270eef
diff --git a/web/src/bootstrap_typeahead.js b/web/src/bootstrap_typeahead.js
index a1e9fc25882..46f4511fd4e 100644
--- a/web/src/bootstrap_typeahead.js
+++ b/web/src/bootstrap_typeahead.js
@@ -303,10 +303,7 @@ Typeahead.prototype = {
return this.shown ? this.hide() : this;
}
- const items =
- typeof this.source === "function"
- ? this.source(this.query, this.process.bind(this))
- : this.source;
+ const items = this.source(this.query);
if (!items && this.shown) {
this.hide();