Просмотр исходного кода

bugfix (#970)

原代码错用 location 变量作为判断,会一直读取 window.location
Alexius Lee 8 лет назад
Родитель
Сommit
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;