fix the things

This commit is contained in:
ansuz
2017-06-15 18:13:24 +02:00
parent c0e2c1060e
commit 0e9ebddf11

View File

@@ -68,7 +68,11 @@ define([], function () {
Util.replaceHash = function (hash) { Util.replaceHash = function (hash) {
if (window.history && window.history.replaceState) { if (window.history && window.history.replaceState) {
if (!/^#/.test(hash)) { hash = '#' + hash; } if (!/^#/.test(hash)) { hash = '#' + hash; }
return void window.history.replaceState({}, window.document.title, hash); void window.history.replaceState({}, window.document.title, hash);
if (typeof(window.onhashchange) === 'function') {
window.onhashchange();
}
return;
} }
window.location.hash = hash; window.location.hash = hash;
}; };