mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
Fix admin.update_default_streams_table errors if tab not open.
It turns out that our logic for updating the default streams table crashed in the case where the administration tab was not open. Fixes: #1540.
This commit is contained in:
@@ -101,8 +101,10 @@ function get_non_default_streams_names(streams_data) {
|
||||
}
|
||||
|
||||
exports.update_default_streams_table = function () {
|
||||
$("#admin_default_streams_table").expectOne().find("tr.default_stream_row").remove();
|
||||
populate_default_streams(page_params.realm_default_streams);
|
||||
if ($('#administration').hasClass('active')) {
|
||||
$("#admin_default_streams_table").expectOne().find("tr.default_stream_row").remove();
|
||||
populate_default_streams(page_params.realm_default_streams);
|
||||
}
|
||||
};
|
||||
|
||||
function make_stream_default(stream_name) {
|
||||
|
||||
Reference in New Issue
Block a user