diff --git a/src/store/modules/auth/index.ts b/src/store/modules/auth/index.ts index 236d5f21..ce3327cd 100644 --- a/src/store/modules/auth/index.ts +++ b/src/store/modules/auth/index.ts @@ -13,6 +13,7 @@ import { clearAuthStorage, getToken } from './shared'; export const useAuthStore = defineStore(SetupStoreId.Auth, () => { const route = useRoute(); + const authStore = useAuthStore(); const routeStore = useRouteStore(); const tabStore = useTabStore(); const { toLogin, redirectFromLogin } = useRouterPush(false); @@ -39,8 +40,6 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => { /** Reset auth store */ async function resetStore() { - const authStore = useAuthStore(); - recordUserId(); clearAuthStorage();