Fix logout button by using state object references
- Fix undefined variable references in handleLogoutClick - Use state.statusRefreshHandle instead of statusRefreshHandle - Use state.currentUser instead of currentUser
This commit is contained in:
@@ -104,9 +104,9 @@ export async function handleLogoutClick() {
|
||||
try {
|
||||
stopSSE();
|
||||
stopHistoryRefresh();
|
||||
if (statusRefreshHandle) { clearInterval(statusRefreshHandle); statusRefreshHandle.value = null; }
|
||||
if (state.statusRefreshHandle) { clearInterval(state.statusRefreshHandle); state.statusRefreshHandle = null; }
|
||||
await apiHandleLogout();
|
||||
currentUser = null;
|
||||
state.currentUser = null;
|
||||
clearHistory();
|
||||
showLogin();
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user