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: Remove default value for triage.

Zixuan James Li45fdfcd6d4de
diff --git a/static/js/search_suggestion.js b/static/js/search_suggestion.js
index 0d3ac9892a0..035118382f1 100644
--- a/static/js/search_suggestion.js
+++ b/static/js/search_suggestion.js
@@ -112,7 +112,7 @@ function get_stream_suggestions(last, operators) {
streams = streams.filter((stream) => stream_matches_query(stream, query));
- streams = typeahead_helper.sorter(query, streams);
+ streams = typeahead_helper.sorter(query, streams, (x) => x);
const regex = typeahead_helper.build_highlight_regex(query);
const highlight_query = typeahead_helper.highlight_with_escaping_and_regex;
diff --git a/static/js/typeahead_helper.js b/static/js/typeahead_helper.js
index af615e69086..232cded475b 100644
--- a/static/js/typeahead_helper.js
+++ b/static/js/typeahead_helper.js
@@ -287,7 +287,7 @@ function retain_unique_language_aliases(matches) {
}
export function sort_languages(matches, query) {
- const results = typeahead.triage(query, matches);
+ const results = typeahead.triage(query, matches, (x) => x);
// Languages that start with the query
results.matches = results.matches.sort(compare_by_popularity);
diff --git a/static/shared/js/typeahead.js b/static/shared/js/typeahead.js
index 81c54724339..d05fd851535 100644
--- a/static/shared/js/typeahead.js
+++ b/static/shared/js/typeahead.js
@@ -91,7 +91,7 @@ export function get_emoji_matcher(query) {
};
}
-export function triage(query, objs, get_item = (x) => x) {
+export function triage(query, objs, get_item) {
/*
We split objs into four groups: