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}`);