page.redirect was not a function, causing the url not to redirect. als remove the # check so we are no longer serving ads

This commit is contained in:
evanpelle
2025-06-03 16:37:19 -07:00
parent c1f137e098
commit 24b0214f4c
+2 -9
View File
@@ -240,21 +240,14 @@ class Client {
page("/join/:lobbyId", (ctx) => {
if (ctx.init && sessionStorage.getItem("inLobby")) {
// On page reload, go back home
page.redirect("/");
page("/");
return;
}
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}`);
console.log(`joining lobby ${lobbyId}`);
});
page();