Check for null child before cloning menu item

This commit is contained in:
Chris Garrity committed 2019-07-25 11:20:18 -04:00
1 parent c1dcbb0997
commit dd0c3d7468
1 file changed
+1 -1
+1 -1
View File
@@ -58,7 +58,7 @@ MenuItem.propTypes = {
const addDividerClassToFirstChild = (child, id) => (
React.cloneElement(child, {
child && React.cloneElement(child, {
className: classNames(
child.className,
{[styles.menuSection]: id === 0}