From 74f50288554cf9ffff782384e956e57b9a078245 Mon Sep 17 00:00:00 2001 From: Alexius Lee Date: Sun, 25 Feb 2018 07:41:16 +0800 Subject: [PATCH] bugfix (#970) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原代码错用 location 变量作为判断,会一直读取 window.location --- src/components/PageHeader/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/PageHeader/index.js b/src/components/PageHeader/index.js index 22dac870..d85e7165 100644 --- a/src/components/PageHeader/index.js +++ b/src/components/PageHeader/index.js @@ -132,7 +132,7 @@ export default class PageHeader extends PureComponent { } // 根据 location 生成 面包屑 // Generate breadcrumbs based on location - if (location && location.pathname) { + if (routerLocation && routerLocation.pathname) { return this.conversionFromLocation(routerLocation, breadcrumbNameMap); } return null; -- GitLab