From b4650963560fd2863af721d03ff48d2ecf42dd2e Mon Sep 17 00:00:00 2001 From: Christoph Kolb Date: Sun, 30 Jun 2024 13:40:00 +0200 Subject: [PATCH] Fix window crashing on repeated location change --- src/App.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index 4e3f06c..5e732ce 100644 --- a/src/App.js +++ b/src/App.js @@ -147,11 +147,11 @@ const ScaleApp = () => { } if(getHash()) { - window.location.hash = encodeURI(Object.values(getHash()).join('/')) + window.history.pushState({}, "", encodeURI("#" + Object.values(currentState).join("/"))); } const updateHash = () => { - window.location.hash = encodeURI(Object.values(currentState).join('/')) + window.history.pushState({}, "", encodeURI("#" + Object.values(currentState).join("/"))); } const updateThemeColor = () => {