Fixed a bug where if you joined a private lobby through a link and then tried to exit the game through the 'X' button, it will reload the page and rejoin the lobby

This commit is contained in:
NewHappyRabbit
2025-02-18 01:10:26 +02:00
parent 0f325d4be8
commit 6f6078187b
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -52,7 +52,8 @@ export class OptionsMenu extends LitElement implements Layer {
private hasWinner = false;
private onExitButtonClick() {
window.location.reload();
// redirect to the home page
window.location.href = "/";
}
createRenderRoot() {
+1 -1
View File
@@ -287,7 +287,7 @@ export class WinModal extends LitElement implements Layer {
private _handleExit() {
this.hide();
window.location.reload();
window.location.href = "/";
}
init() {