Fix Show Deck showing the deck from a previous battle

This commit is contained in:
Andrio Celos 2025-08-20 22:40:35 +10:00
parent 260b1425bd
commit a02809ef25
No known key found for this signature in database
GPG Key ID: A4B57A2FF4019E28

View File

@ -155,12 +155,14 @@ function onGameStateChange(game: any, playerData: PlayerData | null) {
case GameState.ChoosingStage:
initLobbyPage(window.location.toString());
showPage('lobby');
clearShowDeck();
clearConfirmLeavingGame();
showStageSelectionForm(playerData?.stageSelectionPrompt ?? null, playerData && game.players[playerData.playerIndex]?.isReady);
lobbySelectedStageSection.hidden = true;
break;
case GameState.ChoosingDeck:
showPage('lobby');
clearShowDeck();
if (currentGame.me) setConfirmLeavingGame();
if (selectedStageIndicator)
lobbySelectedStageSection.removeChild(selectedStageIndicator.buttonElement);