From 5c6fb8dbbfd1e9ef729bbef74d1562dbd0e64e19 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Thu, 11 Jun 2020 12:57:42 +0000 Subject: [PATCH] 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`??? --- static/js/tab_bar.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/static/js/tab_bar.js b/static/js/tab_bar.js index bc9820c9c9..8b1458acdc 100644 --- a/static/js/tab_bar.js +++ b/static/js/tab_bar.js @@ -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);