Bug Report
For [email protected]
Priorities and help requested (not applicable if asking question):
Priority: High
Describe the issue:
The Breadcrumb component throws an Error when rendered with its own default props.
If you pass an empty items array, then an error is thrown in _validateProps, because overflowIndex > items.length - 1, since overflowIndex is 0 by default and items.length is 0`.
This is a recently-introduced regression.
Actual behavior:
return (
<Breadcrumb items={ [] } />
);
Throws:
___.js:17621 Uncaught Error: Breadcrumb: overflowIndex out of range
at Breadcrumb._validateProps (___.js:17621)
at new Breadcrumb (___.js:17589)
at constructClassInstance (react.js:8597)
at updateClassComponent (react.js:10081)
at beginWork (react.js:10467)
at performUnitOfWork (react.js:12466)
at workLoop (react.js:12530)
at HTMLUnknownElement.callCallback (react.js:2280)
at Object.invokeGuardedCallbackDev (react.js:2319)
at invokeGuardedCallback (react.js:2176)
Expected behavior:
Should render an empty breadcrumb, with no items.
Bug Report
For
[email protected]Priorities and help requested (not applicable if asking question):
Priority: High
Describe the issue:
The
Breadcrumbcomponent throws anErrorwhen rendered with its own default props.If you pass an empty
itemsarray, then an error is thrown in_validateProps, becauseoverflowIndex > items.length - 1, sinceoverflowIndexis0by default anditems.length is0`.This is a recently-introduced regression.
Actual behavior:
Throws:
Expected behavior:
Should render an empty breadcrumb, with no items.