mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 02:53:52 +00:00
stream settings: Fix exceptions when rerendering subscribers.
If another user subscribed to or unsubscribed from a stream while the current user was not subscribed, we previously would attempt to rerender the subscriber counts for that stream, even though they weren't rendered at all in the first place; this would trigger blueslip errors from the expectOne() check in this function. Fixes #8720.
This commit is contained in:
@@ -150,6 +150,10 @@ exports.set_color = function (stream_id, color) {
|
||||
};
|
||||
|
||||
exports.rerender_subscribers_count = function (sub, just_subscribed) {
|
||||
if (!overlays.streams_open()) {
|
||||
// If the streams overlay isn't open, we don't need to rerender anything.
|
||||
return;
|
||||
}
|
||||
var stream_row = row_for_stream_id(sub.stream_id);
|
||||
stream_data.update_subscribers_count(sub);
|
||||
if (!sub.can_access_subscribers || (just_subscribed && sub.invite_only)) {
|
||||
|
||||
Reference in New Issue
Block a user