diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index 7cd5be5b217442d4936de94920053f90e2a36773..dba40f3431722ab1f4451cc535fdea4d8cf9d049 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -100,7 +100,7 @@ class BasicLayout extends React.PureComponent { let routeAuthority = ['noAuthority']; const getAuthority = (key, routes) => { routes.map(route => { - if (route.path === key) { + if (route.path && pathToRegexp(route.path).test(key)) { routeAuthority = route.authority; } else if (route.routes) { routeAuthority = getAuthority(key, route.routes);