瀏覽代碼

bugfix (#970)

原代码错用 location 变量作为判断,会一直读取 window.location
Alexius Lee 8 年之前
父節點
當前提交
74f5028855
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/components/PageHeader/index.js

+ 1 - 1
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;