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.

search_suggestion: Add assertion to help typescript.

Aman Agrawale1d57b91b55d
diff --git a/web/src/search_suggestion.ts b/web/src/search_suggestion.ts
index 67ce502800d..b6f2a7a4061 100644
--- a/web/src/search_suggestion.ts
+++ b/web/src/search_suggestion.ts
@@ -218,6 +218,8 @@ function get_channel_suggestions(last: NarrowTerm, terms: NarrowTerm[]): Suggest
return [];
}
+ assert(last.operator === "channel" || last.operator === "search" || last.operator === "");
+
const query = last.operand;
let channels = stream_data.subscribed_streams();