code cleanup: Avoid shadowing the tab_bar global.

I tried to make the most minimal change here
possible, since I don't really know this module
well.  Possible alternatives were:

    * $('#tab_bar') everywhere
    * elem
    * tab_bar_elem

I don't feel strongly.

Long term I believe we intend to change the name
of this module to something more like `navbar.js`???
This commit is contained in:
Steve Howell 2020-06-11 12:57:42 +00:00 committed by Tim Abbott
parent 863660281e
commit 5c6fb8dbbf
1 changed files with 5 additions and 5 deletions

View File

@ -54,15 +54,15 @@ exports.colorize_tab_bar = function () {
};
function append_and_display_title_area(tab_bar_data) {
const tab_bar = $("#tab_bar");
tab_bar.empty();
const tab_bar_elem = $("#tab_bar");
tab_bar_elem.empty();
const rendered = render_tab_bar(tab_bar_data);
tab_bar.append(rendered);
tab_bar_elem.append(rendered);
if (tab_bar_data.stream_settings_link) {
exports.colorize_tab_bar();
}
tab_bar.removeClass('notdisplayed');
const content = tab_bar.find('span.rendered_markdown');
tab_bar_elem.removeClass('notdisplayed');
const content = tab_bar_elem.find('span.rendered_markdown');
if (content) {
// Update syntax like stream names, emojis, mentions, timestamps.
rendered_markdown.update_elements(content);