mirror of
https://github.com/AndrioCelos/TableturfBattleApp.git
synced 2026-07-19 00:31:33 -05:00
Fix infinite loop of 'game not found' errors in a certain situation
This commit is contained in:
parent
0b57a48de3
commit
ef8f5a700d
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user