Explorar el Código

bugfix (#970)

原代码错用 location 变量作为判断,会一直读取 window.location
Alexius Lee hace 8 años
padre
commit
74f5028855
Se han modificado 1 ficheros con 1 adiciones y 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;