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 {
|
try {
|
||||||
stopSSE();
|
stopSSE();
|
||||||
stopHistoryRefresh();
|
stopHistoryRefresh();
|
||||||
if (statusRefreshHandle) { clearInterval(statusRefreshHandle); statusRefreshHandle.value = null; }
|
if (state.statusRefreshHandle) { clearInterval(state.statusRefreshHandle); state.statusRefreshHandle = null; }
|
||||||
await apiHandleLogout();
|
await apiHandleLogout();
|
||||||
currentUser = null;
|
state.currentUser = null;
|
||||||
clearHistory();
|
clearHistory();
|
||||||
showLogin();
|
showLogin();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user