perf(project): Initializing the static routing function does not require asynchronization (#493)

This commit is contained in:
CHENZL 2024-06-14 11:47:16 +08:00 committed by GitHub
parent 376e2f7d84
commit 2198b982f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -219,7 +219,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
/** Init auth route */ /** Init auth route */
async function initAuthRoute() { async function initAuthRoute() {
if (authRouteMode.value === 'static') { if (authRouteMode.value === 'static') {
await initStaticAuthRoute(); initStaticAuthRoute();
} else { } else {
await initDynamicAuthRoute(); await initDynamicAuthRoute();
} }
@ -228,7 +228,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
} }
/** Init static auth route */ /** Init static auth route */
async function initStaticAuthRoute() { function initStaticAuthRoute() {
const { authRoutes: staticAuthRoutes } = createStaticRoutes(); const { authRoutes: staticAuthRoutes } = createStaticRoutes();
if (authStore.isStaticSuper) { if (authStore.isStaticSuper) {