Skip to content

Commit

Permalink
fix(projects): check if init userInfo when initAuthRoute. fixed #680
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Dec 16, 2024
1 parent 6c5ff3c commit e8c506b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/store/modules/route/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {

/** Init auth route */
async function initAuthRoute() {
// check if user info is initialized
if (!authStore.userInfo.userId) {
await authStore.initUserInfo();
}

if (authRouteMode.value === 'static') {
initStaticAuthRoute();
} else {
Expand Down

0 comments on commit e8c506b

Please sign in to comment.