hashchange: Fix update_browser_history() call for settings.

Even prior to my recent change in settings_panel_menu.js,
we were assigning window.location.hash a value that doesn't
have a '#' prefix.  This probably doesn't matter too much
for the browser, but it does confuse our own checks about
whether we're redundantly updating browser history.

Now we prefix the settings hash with '#' and we encorce
this convention with a blueslip error.
This commit is contained in:
Steve Howell
2018-12-03 16:57:48 +00:00
committed by Tim Abbott
parent 05be16e051
commit 779ed37cfa
2 changed files with 6 additions and 1 deletions

View File

@@ -69,7 +69,7 @@ exports.make_menu = function (opts) {
curr_li.addClass("active");
curr_li.prev().addClass("no-border");
var settings_section_hash = hash_prefix + section;
var settings_section_hash = '#' + hash_prefix + section;
hashchange.update_browser_history(settings_section_hash);
$(".settings-section, .settings-wrapper").removeClass("show");