未验证 提交 bb040b19 编写于 作者: Z zacks 提交者: GitHub

fix(utils): 外链菜单权限判断报错 (#6625)

上级 3989aa1b
......@@ -35,8 +35,8 @@ export const getAuthorityFromRouter = <T extends Route>(
pathname: string,
): T | undefined => {
const authority = router.find(
({ routes, path = '/' }) =>
(path && pathRegexp(path).exec(pathname)) ||
({ routes, path = '/', target = '_self' }) =>
(path && target !== '_blank' && pathRegexp(path).exec(pathname)) ||
(routes && getAuthorityFromRouter(routes, pathname)),
);
if (authority) return authority;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册