Commit 189accea authored by 陈帅's avatar 陈帅

fix #2503,fix 404 page error

parent d393c29d
......@@ -171,7 +171,7 @@ class BasicLayout extends React.PureComponent {
const pathKey = Object.keys(this.breadcrumbNameMap).find(key =>
pathToRegexp(key).test(pathname)
);
return this.breadcrumbNameMap[pathKey] || {};
return this.breadcrumbNameMap[pathKey];
};
getPageTitle = pathname => {
......@@ -261,7 +261,10 @@ class BasicLayout extends React.PureComponent {
{...this.props}
/>
<Content style={this.getContentStyle()}>
<Authorized authority={routerConfig.authority} noMatch={<Exception403 />}>
<Authorized
authority={routerConfig && routerConfig.authority}
noMatch={<Exception403 />}
>
{children}
</Authorized>
</Content>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment