Explorar o código

bugfix (#970)

原代码错用 location 变量作为判断,会一直读取 window.location
Alexius Lee %!s(int64=8) %!d(string=hai) anos
pai
achega
74f5028855
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;