Commit 23d00abb authored by 耐小心's avatar 耐小心 Committed by 陈帅

Fix当hideInBreadcrumb==true,面包屑报错的问题 (#3984)

* fix hideInBreadcrumb==true error

* update for ci
parent f1c495d3
...@@ -61,7 +61,8 @@ const conversionFromLocation = (routerLocation, breadcrumbNameMap, props) => { ...@@ -61,7 +61,8 @@ const conversionFromLocation = (routerLocation, breadcrumbNameMap, props) => {
// Convert the url to an array // Convert the url to an array
const pathSnippets = urlToList(routerLocation.pathname); const pathSnippets = urlToList(routerLocation.pathname);
// Loop data mosaic routing // Loop data mosaic routing
const extraBreadcrumbItems = pathSnippets.map(url => { const extraBreadcrumbItems = pathSnippets
.map(url => {
const currentBreadcrumb = getBreadcrumb(breadcrumbNameMap, url); const currentBreadcrumb = getBreadcrumb(breadcrumbNameMap, url);
if (currentBreadcrumb.inherited) { if (currentBreadcrumb.inherited) {
return null; return null;
...@@ -74,7 +75,8 @@ const conversionFromLocation = (routerLocation, breadcrumbNameMap, props) => { ...@@ -74,7 +75,8 @@ const conversionFromLocation = (routerLocation, breadcrumbNameMap, props) => {
breadcrumbName: name, breadcrumbName: name,
} }
: null; : null;
}); })
.filter(item => item !== null);
// Add home breadcrumbs to your head if defined // Add home breadcrumbs to your head if defined
if (home) { if (home) {
extraBreadcrumbItems.unshift({ extraBreadcrumbItems.unshift({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment