From b4c0a5b0d2184846c5170a4f4727b026ea8c6dd3 Mon Sep 17 00:00:00 2001 From: evanpelle Date: Mon, 19 May 2025 18:35:36 -0700 Subject: [PATCH] bugfix: pressing lobby button causes player to attempt to join invalid game --- src/client/Main.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/client/Main.ts b/src/client/Main.ts index 2b527e577..9955333ba 100644 --- a/src/client/Main.ts +++ b/src/client/Main.ts @@ -244,6 +244,13 @@ class Client { } const lobbyId = ctx.params.lobbyId; + if (lobbyId?.endsWith("#")) { + // When the cookies button is pressed, '#' is added to the url + // causing the page to attempt to rejoin the lobby during game play. + console.error("Invalid lobby ID provided"); + return; + } + this.joinModal.open(lobbyId); consolex.log(`joining lobby ${lobbyId}`);