fix(projects): check if init userInfo when initAuthRoute. fixed #680
This commit is contained in:
parent
0dfcf18b64
commit
9f4fb8c3fb
@ -176,6 +176,11 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
|||||||
|
|
||||||
/** Init auth route */
|
/** Init auth route */
|
||||||
async function initAuthRoute() {
|
async function initAuthRoute() {
|
||||||
|
// check if user info is initialized
|
||||||
|
if (!authStore.userInfo.userId) {
|
||||||
|
await authStore.initUserInfo();
|
||||||
|
}
|
||||||
|
|
||||||
if (authRouteMode.value === 'static') {
|
if (authRouteMode.value === 'static') {
|
||||||
initStaticAuthRoute();
|
initStaticAuthRoute();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user