Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
typing: Fix assertion error when narrowed to a non existing stream.
Prakhar Pratyusha8d056ac3b45
diff --git a/web/src/typing_events.ts b/web/src/typing_events.tsindex 6770bf2ed7f..6bc413d24a0 100644--- a/web/src/typing_events.ts+++ b/web/src/typing_events.ts@@ -50,7 +50,10 @@ function get_users_typing_for_narrow(): number[] {if (narrow_state.narrowed_by_topic_reply()) {const current_stream_id = narrow_state.stream_id();const current_topic = narrow_state.topic();- assert(current_stream_id !== undefined);+ if (current_stream_id === undefined) {+ // narrowed to a stream which doesn't exist.+ return [];+ }assert(current_topic !== undefined);return typing_data.get_topic_typists(current_stream_id, current_topic);}