mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
subs: Fix exception with streams overlay open but no active stream.
Previously, if you had the streams overlay open (but no active stream clicked) while another user edited your subscriptions state, we'd throw an exception handle the get_events call, because the code for rerendering the subscribers list didn't consider the possibility that there was no active stream.
This commit is contained in:
@@ -223,7 +223,7 @@ exports.update_settings_for_subscribed = function (sub) {
|
||||
}
|
||||
|
||||
var active_stream = exports.active_stream();
|
||||
if (active_stream.stream_id === sub.stream_id) {
|
||||
if (active_stream !== undefined && active_stream.stream_id === sub.stream_id) {
|
||||
stream_edit.rerender_subscribers_list(sub);
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ exports.update_settings_for_unsubscribed = function (sub) {
|
||||
stream_edit.hide_sub_settings(sub);
|
||||
|
||||
var active_stream = exports.active_stream();
|
||||
if (active_stream.stream_id === sub.stream_id) {
|
||||
if (active_stream !== undefined && active_stream.stream_id === sub.stream_id) {
|
||||
stream_edit.rerender_subscribers_list(sub);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user