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: Use const instead of let when not reassigned.

evykassirere12543f957e4
diff --git a/web/third/bootstrap-typeahead/typeahead.js b/web/third/bootstrap-typeahead/typeahead.js
index 09bde4cf55e..34de4ddc9b2 100644
--- a/web/third/bootstrap-typeahead/typeahead.js
+++ b/web/third/bootstrap-typeahead/typeahead.js
@@ -284,8 +284,6 @@ import {get_string_diff} from "../../src/util";
},
lookup(hideOnEmpty) {
- let items;
-
this.query = this.$element.is("[contenteditable]")
? this.$element.text()
: this.$element.val();
@@ -297,7 +295,7 @@ import {get_string_diff} from "../../src/util";
return this.shown ? this.hide() : this;
}
- items =
+ const items =
typeof this.source === "function"
? this.source(this.query, this.process.bind(this))
: this.source;