From a1c8e3549aaf2fb5607aa36409ff08b86a954b60 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 25 Jul 2024 07:49:38 -0700 Subject: [PATCH] message_list_view: Don't assume stream_id is defined. --- web/src/message_list_view.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/message_list_view.js b/web/src/message_list_view.js index 4666eb9cdb..fcc5038144 100644 --- a/web/src/message_list_view.js +++ b/web/src/message_list_view.js @@ -289,10 +289,11 @@ function populate_group_from_message_container(group, message_container) { // module. Ideally, we'd clean this up by making the // tutorial populate stream_settings_ui.js "properly". group.stream_id = -1; + group.stream_name = $t({defaultMessage: "Unknown channel"}); } else { group.stream_id = sub.stream_id; + group.stream_name = stream_data.get_stream_name_from_id(sub.stream_id); } - group.stream_name = stream_data.get_stream_name_from_id(sub.stream_id); group.is_subscribed = stream_data.is_subscribed(group.stream_id); group.topic_is_resolved = resolved_topic.is_resolved(group.topic); group.visibility_policy = user_topics.get_topic_visibility_policy(