subscriptions: Update get_active_data.tabs to be more specific.

Since the subscriptions container contains multiple toggler components,
it is helpful to know that the function's tab key returns all the active
tabs in the page (currently there are 2). Thus `tab` is changed to `tabs`.

Also, which togglers tab data is being used has been made more specific.
This commit is contained in:
Ryan Rehman
2020-07-09 19:00:44 +05:30
committed by Tim Abbott
parent 1b05f8e6c9
commit e0b5c2ec49
2 changed files with 8 additions and 6 deletions

View File

@@ -156,7 +156,7 @@ exports.open_edit_panel_for_row = function (stream_row) {
};
exports.open_edit_panel_empty = function () {
const tab_key = subs.get_active_data().tab.attr("data-tab-key");
const tab_key = $(subs.get_active_data().tabs[0]).attr("data-tab-key");
clear_edit_panel();
subs.show_subs_pane.nothing_selected();
exports.setup_subscriptions_tab_hash(tab_key);