Skip to content

Commit

Permalink
refactor(breadcrumb): make title null and undefined causes the same b…
Browse files Browse the repository at this point in the history
…ehaviour (#43099)
  • Loading branch information
Asanio06 committed Jun 21, 2023
1 parent 3a67e46 commit e78e2cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/breadcrumb/useItemRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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('|');
Expand Down

0 comments on commit e78e2cb

Please sign in to comment.