Fix: uninotes guard

This commit is contained in:
hyzen
2026-06-10 07:15:57 +05:30
parent e1c6bb1eb6
commit 425601481e
5 changed files with 31 additions and 15 deletions

View File

@@ -191,7 +191,13 @@
}
isAdmin = !!data.is_admin;
username = data.username || null;
username = data.logged_in ? (data.username || null) : null;
// Keep localStorage in sync with what the server says
if (!data.logged_in && localStorage.getItem('f4_username')) {
localStorage.removeItem('f4_username');
localStorage.removeItem('f4_login_time');
localStorage.removeItem('f4_session_fails');
}
// ── Render comments first ──
if (!data.comments.length) {