Skip to content

Commit b0a465d

Browse files
authored
Fix navigation recursion (#357)
Conditionally update window.location.hash for #home to avoid navigation recursion.
1 parent 3d93f17 commit b0a465d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

resources/main.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,8 @@ class MainBenchmarkClient {
349349

350350
_setLocationHash(hash) {
351351
if (hash === "#home" || hash === "") {
352-
window.location.hash = "#home";
352+
if (window.location.hash !== hash)
353+
window.location.hash = "#home";
353354
this._removeLocationHash();
354355
} else {
355356
window.location.hash = hash;

0 commit comments

Comments
 (0)