mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 10:57:58 +00:00
message_list: Fix exception with nonexistent streams.
If the stream no longer exists, we don't need to try to show a stream resubscribe UI.
This commit is contained in:
@@ -392,8 +392,14 @@ exports.MessageList.prototype = {
|
|||||||
if (!this.last_message_historical) {
|
if (!this.last_message_historical) {
|
||||||
trailing_bookend_content = this.unsubscribed_bookend_content(stream_name);
|
trailing_bookend_content = this.unsubscribed_bookend_content(stream_name);
|
||||||
|
|
||||||
// For invite only streams, hide the resubscribe button
|
// For invite only streams or streams that no longer
|
||||||
show_button = !stream_data.get_sub(stream_name).invite_only;
|
// exist, hide the resubscribe button
|
||||||
|
var sub = stream_data.get_sub(stream_name);
|
||||||
|
if (sub !== undefined) {
|
||||||
|
show_button = !sub.invite_only;
|
||||||
|
} else {
|
||||||
|
show_button = false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
trailing_bookend_content = this.not_subscribed_bookend_content(stream_name);
|
trailing_bookend_content = this.not_subscribed_bookend_content(stream_name);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user