From 189accea4465fa9d3c7ad6d5d0e51ebf464610c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Tue, 9 Oct 2018 19:35:25 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#2503=EF=BC=8Cfix=20404=20page=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/BasicLayout.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index ea849599..aa29acc7 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -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} /> - }> + } + > {children} -- GitLab