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.

message_view: Fix error thrown on deleting stream and searching for it.

roanster0073d152296f6e9
diff --git a/web/src/message_list.js b/web/src/message_list.js
index f14b9bbc137..5b19064757a 100644
--- a/web/src/message_list.js
+++ b/web/src/message_list.js
@@ -340,8 +340,8 @@ export class MessageList {
let just_unsubscribed = false;
const subscribed = stream_data.is_subscribed_by_name(stream_name);
const sub = stream_data.get_sub(stream_name);
- const invite_only = sub.invite_only;
- const is_web_public = sub.is_web_public;
+ const invite_only = sub && sub.invite_only;
+ const is_web_public = sub && sub.is_web_public;
const can_toggle_subscription =
sub !== undefined && stream_data.can_toggle_subscription(sub);
if (sub === undefined) {