diff --git a/TableturfBattleClient/src/Pages/PreGamePage.ts b/TableturfBattleClient/src/Pages/PreGamePage.ts index ea1ce9c..fdd8a6d 100644 --- a/TableturfBattleClient/src/Pages/PreGamePage.ts +++ b/TableturfBattleClient/src/Pages/PreGamePage.ts @@ -276,6 +276,7 @@ function joinGameError(message: string, fromInitialLoad: boolean) { if (fromInitialLoad) clearPreGameForm(true); else { + showPage('preGame'); gameIDBox.focus(); gameIDBox.setSelectionRange(0, gameIDBox.value.length); } diff --git a/TableturfBattleClient/src/app.ts b/TableturfBattleClient/src/app.ts index 0029739..5ec0b02 100644 --- a/TableturfBattleClient/src/app.ts +++ b/TableturfBattleClient/src/app.ts @@ -269,8 +269,10 @@ function setupWebSocket(gameID: string) { } setLoadingMessage(null); if (!payload.data) { + joinGameError('The game was not found.', false); + currentGame = null; + webSocket.removeEventListener('close', webSocket_close); webSocket.close(); - alert('The game was not found.'); } else { currentGame = { id: gameID,