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.

eslint: Fix unicorn/no-unnecessary-splice.

Anders Kaseorg655c334892bb
diff --git a/web/src/search_suggestion.ts b/web/src/search_suggestion.ts
index a7ae4287149..cf40a6c0060 100644
--- a/web/src/search_suggestion.ts
+++ b/web/src/search_suggestion.ts
@@ -718,7 +718,7 @@ function get_topic_suggestions(
const terms: NarrowTerm[] = [{operator: "channel", operand: topic.channel_id}, topic_term];
// We don't want to have two channel pills in the search suggestion.
if (filter.has_operator("channel")) {
- terms.splice(0, 1);
+ terms.shift();
}
return format_as_suggestion(terms);