fix(projects): check if init userInfo when initAuthRoute. fixed #680

This commit is contained in:
Soybean 2024-12-11 12:38:28 +08:00
parent 0dfcf18b64
commit 9f4fb8c3fb

View File

@ -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 {