diff --git a/src/components/PageHeader/index.js b/src/components/PageHeader/index.js index 22dac8705208e12ee45e146deb40649a3c7e515a..d85e716576d3cc7702b5bf107d5c29e5994484eb 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;