From 917e3f07209851a3df0b7e220e38df4df7612a68 Mon Sep 17 00:00:00 2001 From: bqy_fe <1743369777@qq.com> Date: Fri, 17 Dec 2021 10:51:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=E7=94=9F=E6=88=90=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=87=BA=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/generator-router.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/generator-router.tsx b/src/router/generator-router.tsx index b82b0e53..6d913c3a 100644 --- a/src/router/generator-router.tsx +++ b/src/router/generator-router.tsx @@ -69,7 +69,7 @@ export function filterAsyncRoute( // 如果是页面 const Component = constantRouterComponents[viewPath] || NotFound; route.component = Component; - const perms = routes.filter((n) => n.parentId === item.id).map((n) => n.perms.split(',')); + const perms = routes.filter((n) => n.parentId === item.id).map((n) => n.perms?.split(',')); if (route.meta && perms) { // 设置当前页面所拥有的权限 route.meta.perms = perms.flat(Infinity) as string[];