emoji_picker: Clear search_results by assigning 0 to its length.

This will allow `search_results` to be `const`, which works around a
future ESLint complaint.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2019-10-25 15:28:42 -07:00
committed by Tim Abbott
parent 02004c9b0f
commit ed607bee2c

View File

@@ -203,7 +203,7 @@ function filter_emojis() {
if (query !== "") {
var categories = exports.complete_emoji_catalog;
var search_terms = query.split(" ");
search_results = [];
search_results.length = 0;
_.each(categories, function (category) {
if (category.name === "Popular") {
return;