Fix: strict session check

This commit is contained in:
hyzen
2026-07-30 07:54:07 +05:30
parent f3fe915155
commit 6cf939a509
2 changed files with 2 additions and 2 deletions

View File

@@ -35,7 +35,7 @@
return r.json(); return r.json();
}) })
.then(function (data) { .then(function (data) {
if (!data.valid) { if (data.valid === false) {
// Session invalid — clear localStorage and reload to update UI // Session invalid — clear localStorage and reload to update UI
localStorage.removeItem('f4_username'); localStorage.removeItem('f4_username');
localStorage.removeItem('f4_login_time'); localStorage.removeItem('f4_login_time');

View File

@@ -35,7 +35,7 @@
return r.json(); return r.json();
}) })
.then(function (data) { .then(function (data) {
if (!data.valid) { if (data.valid === false) {
// Session invalid — clear localStorage and reload to update UI // Session invalid — clear localStorage and reload to update UI
localStorage.removeItem('f4_username'); localStorage.removeItem('f4_username');
localStorage.removeItem('f4_login_time'); localStorage.removeItem('f4_login_time');