提交 fd116eed 编写于 作者: O onceyoung 提交者: 陈帅

forEach should be used instead of map (#3332)

上级 be6f46de
......@@ -99,7 +99,7 @@ class BasicLayout extends React.PureComponent {
getRouterAuthority = (pathname, routeData) => {
let routeAuthority = ['noAuthority'];
const getAuthority = (key, routes) => {
routes.map(route => {
routes.forEach(route => {
if (route.path && pathToRegexp(route.path).test(key)) {
routeAuthority = route.authority;
} else if (route.routes) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册