Skip to content

Commit 9f4fb8c

Browse files
committed
fix(projects): check if init userInfo when initAuthRoute. fixed #680
1 parent 0dfcf18 commit 9f4fb8c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/store/modules/route/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,11 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
176176

177177
/** Init auth route */
178178
async function initAuthRoute() {
179+
// check if user info is initialized
180+
if (!authStore.userInfo.userId) {
181+
await authStore.initUserInfo();
182+
}
183+
179184
if (authRouteMode.value === 'static') {
180185
initStaticAuthRoute();
181186
} else {

0 commit comments

Comments
 (0)