stream settings: Fix error in rendering stream members in UI.

To re-render stream members on subscription add or remove event,
we are accessing undefined value "active_stream.stream_id" rather
than "active_stream.id", which resulted in falsey value and our
stream members were not updated unconditionally.
This commit is contained in:
YJDave
2018-02-09 19:06:23 +05:30
committed by Tim Abbott
parent 777841781f
commit cc2eb60ca5

View File

@@ -222,7 +222,7 @@ exports.update_settings_for_subscribed = function (sub) {
}
var active_stream = exports.active_stream();
if (active_stream !== undefined && active_stream.stream_id === sub.stream_id) {
if (active_stream !== undefined && active_stream.id === sub.stream_id) {
stream_edit.rerender_subscribers_list(sub);
}
@@ -242,7 +242,7 @@ exports.update_settings_for_unsubscribed = function (sub) {
stream_edit.hide_sub_settings(sub);
var active_stream = exports.active_stream();
if (active_stream !== undefined && active_stream.stream_id === sub.stream_id) {
if (active_stream !== undefined && active_stream.id === sub.stream_id) {
stream_edit.rerender_subscribers_list(sub);
}