Browse Source

refactor(breadcrumb): make title null and undefined causes the same behaviour (#43099)

pull/43133/head
Lansana Diomande 1 year ago
committed by GitHub
parent
commit
e78e2cb385
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      components/breadcrumb/useItemRender.tsx

2
components/breadcrumb/useItemRender.tsx

@ -11,7 +11,7 @@ type ItemRender = NonNullable<BreadcrumbProps['itemRender']>;
type InternalItemRenderParams = AddParameters<ItemRender, [href?: string]>;
function getBreadcrumbName(route: InternalRouteType, params: any) {
if (route.title === undefined) {
if (route.title === undefined || route.title === null) {
return null;
}
const paramsKeys = Object.keys(params).join('|');

Loading…
Cancel
Save