Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
fix: 🐛生成路由出错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Dec 17, 2021
1 parent a934e12 commit 917e3f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/router/generator-router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down

0 comments on commit 917e3f0

Please sign in to comment.