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