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.

narrow_state: Fix `_possible_unread_message_ids` when `with` operator.

roanster0075f3de977d9db
diff --git a/web/src/narrow_state.ts b/web/src/narrow_state.ts
index d5e46227278..7b60ea3c77c 100644
--- a/web/src/narrow_state.ts
+++ b/web/src/narrow_state.ts
@@ -282,13 +282,8 @@ export function _possible_unread_message_ids(
assert(!current_filter.requires_adjustment_for_moved_with_target);
if (current_filter.can_bucket_by("channel", "topic", "with")) {
- sub = stream_sub(current_filter);
- topic_name = topic(current_filter);
-
- if (sub === undefined || topic_name === undefined) {
- /* istanbul ignore next */
- return [];
- }
+ sub = stream_sub(current_filter)!;
+ topic_name = topic(current_filter)!;
return unread.get_msg_ids_for_topic(sub.stream_id, topic_name);
}