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

This commit is contained in:
Lansana Diomande 2023-06-21 04:02:06 +02:00 committed by GitHub
parent 3a67e46b60
commit e78e2cb385
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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('|');