From 763b0621c393e02a355ac8e0d747b132477b2bb6 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 a204ad084..9c6572249 100644 --- a/src/client/Main.ts +++ b/src/client/Main.ts @@ -195,6 +195,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}`);