Skip to content

Commit

Permalink
itemRender do not rely on route.breadcrumbName
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Mar 23, 2017
1 parent 106d9a7 commit ac1c7f3
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions components/breadcrumb/Breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,11 @@ export default class Breadcrumb extends React.Component<BreadcrumbProps, any> {
if (path) {
paths.push(path);
}
if (route.breadcrumbName) {
return (
<BreadcrumbItem separator={separator} key={route.breadcrumbName}>
{itemRender(route, params, routes, paths)}
</BreadcrumbItem>
);
}
return null;
return (
<BreadcrumbItem separator={separator} key={route.breadcrumbName || path}>
{itemRender(route, params, routes, paths)}
</BreadcrumbItem>
);
});
} else if (children) {
crumbs = React.Children.map(children, (element: any, index) => {
Expand Down

0 comments on commit ac1c7f3

Please sign in to comment.