From 22e2b3866be888a66f47a12f34c8e6e15003bb17 Mon Sep 17 00:00:00 2001 From: Lynn Date: Tue, 18 Jan 2022 15:36:31 +0100 Subject: [PATCH] Fix replaceState bug --- src/Game.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Game.tsx b/src/Game.tsx index edd700d..be72353 100644 --- a/src/Game.tsx +++ b/src/Game.tsx @@ -66,7 +66,8 @@ function Game(props: GameProps) { const [gameNumber, setGameNumber] = useState(1); const startNextGame = () => { if (challenge) { - window.history.replaceState("", "", "/"); + // Clear the URL parameters: + window.history.replaceState({}, document.title, window.location.pathname); } setChallenge(""); setTarget(randomTarget(wordLength));