react-router-breadcrumbs
react-router-breadcrumbs copied to clipboard
Reasonable default if no name is provided?
Right now, react-router-breadcrumbs prevents rendering if no name is provided to a route. I know that error is my fault ;), but maybe it would make sense provide a more reasonable default if no name is provided?
More specifically, maybe changing https://github.com/nutgaard/react-router-breadcrumbs/blob/master/src/breadcrumbs.js#L19 into something like:
var text = route.breadcrumbName || route.name || (route.component && route.component.name) || route.path || 'Unknown'
Hi, and thanks for reporting this issue.
I've already commented this here; https://github.com/nutgaard/react-router-breadcrumbs#undocumented--todo
But I'll add the Unknown
fallback as soon as I can. :)
Thanks! Sorry for missing that in the documentation :)