Fix replaceState bug
This commit is contained in:
@@ -66,7 +66,8 @@ function Game(props: GameProps) {
|
|||||||
const [gameNumber, setGameNumber] = useState(1);
|
const [gameNumber, setGameNumber] = useState(1);
|
||||||
const startNextGame = () => {
|
const startNextGame = () => {
|
||||||
if (challenge) {
|
if (challenge) {
|
||||||
window.history.replaceState("", "", "/");
|
// Clear the URL parameters:
|
||||||
|
window.history.replaceState({}, document.title, window.location.pathname);
|
||||||
}
|
}
|
||||||
setChallenge("");
|
setChallenge("");
|
||||||
setTarget(randomTarget(wordLength));
|
setTarget(randomTarget(wordLength));
|
||||||
|
|||||||
Reference in New Issue
Block a user