go home when game is gone

This commit is contained in:
Branden J Brown 2024-02-02 18:54:10 -06:00
parent 167b6460f4
commit b2618e1ba8
1 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,9 @@ watchEffect(() => {
if (data.value == null) { if (data.value == null) {
game.value = null; game.value = null;
dealer.value = null; dealer.value = null;
if (window.location.pathname.includes('game/')) {
history.replaceState(null, '', window.origin);
}
return; return;
} }
const m = JSON.parse(data.value) as Game | GameStart; const m = JSON.parse(data.value) as Game | GameStart;