Fix an error on reassigning window.location; use reload() instead

This commit is contained in:
Jean-Baptiste Emmanuel Zorg 2025-03-30 23:49:49 +02:00
parent a3efd25c79
commit 351c0e4394
3 changed files with 5 additions and 6 deletions
BondageClub/Screens
Character/Relog
Room
AsylumBedroom
MainHall

View file

@ -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();
}

View file

@ -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();
}
}

View file

@ -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();
}
}