From 694396dcfb187595888100b7df676582b11a02e7 Mon Sep 17 00:00:00 2001 From: eric Date: Fri, 9 Jan 2026 23:22:49 +0800 Subject: [PATCH] refactor: move cleanup to finally block --- playground/src/store/auth.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playground/src/store/auth.ts b/playground/src/store/auth.ts index 14100727d..b50ee7729 100644 --- a/playground/src/store/auth.ts +++ b/playground/src/store/auth.ts @@ -86,13 +86,13 @@ export const useAuthStore = defineStore('auth', () => { try { await logoutApi(); - - resetAllStores(); - accessStore.setLoginExpired(false); } catch { // 不做任何处理 } finally { isLoggingOut.value = false; // 重置 标识 + + resetAllStores(); + accessStore.setLoginExpired(false); } // 回登录页带上当前路由地址