Bug in breadcrumb.js for catch-all routes in react router
Posted: 01 Dec 2022, 16:50
Hi,
I encounter an error when I have a catch-all route in app.js
The app crashed because of this line in breadcrumb.js
My temp workaround
Kindly update in the next version. Thanks!
p/s: diamond is a beautiful piece of work. Keep it up!
I encounter an error when I have a catch-all route in app.js
Code: Select all
<Routes>
// some valid routes....
<Route path="*" element={<ErrorPage />} />
</Routes>
Code: Select all
const label = props.meta.label; // TypeError: undefined is not an object (evaluating 'props.meta.label')
Code: Select all
const label = props?.meta?.label;
return label
? <>{location.pathname === '/' ? <span>Current Working</span> : <span>{label}</span>}</>
: <span>No page found</span>
p/s: diamond is a beautiful piece of work. Keep it up!