From 109955f7f9666da8203131e7e6c80229b596724c Mon Sep 17 00:00:00 2001 From: BloxerHD018 Date: Tue, 4 Nov 2025 22:04:09 +0000 Subject: [PATCH] Actually Fix Account Deletion --- js/accounts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/accounts.js b/js/accounts.js index 79a7241..96bdced 100644 --- a/js/accounts.js +++ b/js/accounts.js @@ -85,13 +85,13 @@ async function deleteAccount() { let expiryStr = sessionStorage.getItem("authExpires"); if (expiryStr) { // Expiry exists so token should exist + token = sessionStorage.getItem("authToken"); + let expiry = new Date(expiryStr); if (expiry < new Date()) { // Expired token window.location.href = "/account/login?redirect=/account" } else if (!token) { // Expiry Saved but No Token (shouldn't be possible but it'll be caught if it happens) window.location.href = "/account/login?redirect=/account" - } else { - token = sessionStorage.getItem("authToken"); } } else { // Token Never Saved in Session window.location.href = "/account/login?redirect=/account"