Skip to content

Commit

Permalink
Fix navigation recursion (#357)
Browse files Browse the repository at this point in the history
Conditionally update window.location.hash for #home to avoid navigation recursion.
  • Loading branch information
camillobruni authored Jan 25, 2024
1 parent 3d93f17 commit b0a465d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,8 @@ class MainBenchmarkClient {

_setLocationHash(hash) {
if (hash === "#home" || hash === "") {
window.location.hash = "#home";
if (window.location.hash !== hash)
window.location.hash = "#home";
this._removeLocationHash();
} else {
window.location.hash = hash;
Expand Down

0 comments on commit b0a465d

Please sign in to comment.