diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index d5306093ec25b98cb0ee1362cb38cb6e97703faa..914f47f8ce81adc592bde2361c6587893d21a59a 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -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) {