From 351c0e4394668f3e41f04fa9ea1f68a60210f522 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Emmanuel Zorg <zorgjeanbe@proton.me> Date: Sun, 30 Mar 2025 23:49:49 +0200 Subject: [PATCH] Fix an error on reassigning window.location; use reload() instead --- BondageClub/Screens/Character/Relog/Relog.js | 3 +-- BondageClub/Screens/Room/AsylumBedroom/AsylumBedroom.js | 5 +++-- BondageClub/Screens/Room/MainHall/MainHall.js | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/BondageClub/Screens/Character/Relog/Relog.js b/BondageClub/Screens/Character/Relog/Relog.js index ea633f3cfc..67494d25bc 100644 --- a/BondageClub/Screens/Character/Relog/Relog.js +++ b/BondageClub/Screens/Character/Relog/Relog.js @@ -107,6 +107,5 @@ function RelogKeyDown(event) { * @type {ScreenFunctions["Exit"]} */ function RelogExit() { - // eslint-disable-next-line no-self-assign - window.location = window.location; + window.location.reload(); } diff --git a/BondageClub/Screens/Room/AsylumBedroom/AsylumBedroom.js b/BondageClub/Screens/Room/AsylumBedroom/AsylumBedroom.js index 76e5870c34..86483d26a6 100644 --- a/BondageClub/Screens/Room/AsylumBedroom/AsylumBedroom.js +++ b/BondageClub/Screens/Room/AsylumBedroom/AsylumBedroom.js @@ -46,6 +46,7 @@ function AsylumBedroomClick() { if (MouseIn(750, 0, 500, 1000)) CharacterSetCurrent(Player); if (MouseIn(1885, 25, 90, 90) && (LogValue("Isolated", "Asylum") < CurrentTime) && Player.CanWalk()) CommonSetScreen("Room", "AsylumEntrance"); if (MouseIn(1885, 145, 90, 90)) InformationSheetLoadCharacter(Player); - // eslint-disable-next-line no-self-assign - if (MouseIn(1885, 265, 90, 90) && ((LogValue("Committed", "Asylum") >= CurrentTime) || (LogValue("Isolated", "Asylum") >= CurrentTime))) window.location = window.location; + if (MouseIn(1885, 265, 90, 90) && ((LogValue("Committed", "Asylum") >= CurrentTime) || (LogValue("Isolated", "Asylum") >= CurrentTime))) { + window.location.reload(); + } } diff --git a/BondageClub/Screens/Room/MainHall/MainHall.js b/BondageClub/Screens/Room/MainHall/MainHall.js index ed4b62db5e..e0939070ec 100644 --- a/BondageClub/Screens/Room/MainHall/MainHall.js +++ b/BondageClub/Screens/Room/MainHall/MainHall.js @@ -463,8 +463,7 @@ function MainHallClick() { if ((MouseX >= 1885) && (MouseX < 1975) && (MouseY >= 25) && (MouseY < 115)) { if (window.confirm(TextGet("ExitConfirm"))) { ServerAccountUpdate.SyncToServer(); - // eslint-disable-next-line no-self-assign - window.location = window.location; + window.location.reload(); } }