diff --git a/src/router/guard/permissionGuard.ts b/src/router/guard/permissionGuard.ts index 069258b9..28f3f5c3 100644 --- a/src/router/guard/permissionGuard.ts +++ b/src/router/guard/permissionGuard.ts @@ -99,7 +99,9 @@ export function createPermissionGuard(router: Router) { const routes = await permissionStore.buildRoutesAction() routes.forEach((route) => { - router.addRoute(route as unknown as RouteRecordRaw) + try { + router.addRoute(route as unknown as RouteRecordRaw) + } catch (e) {} }) router.addRoute(PAGE_NOT_FOUND_ROUTE as unknown as RouteRecordRaw)