Fix navigation recursion (#357)

Conditionally update window.location.hash for #home to avoid navigation recursion.
This commit is contained in:
Camillo Bruni 2024-01-25 11:17:48 +01:00 committed by GitHub
parent 3d93f179b6
commit b0a465d60c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;