Merge pull request #5026 from chrisgarrity/fix-file-menu

Check for null child before cloning menu item
This commit is contained in:
Ray Schamp authored and GitHub committed 2019-07-25 11:26:35 -04:00
commit 1f95ff0fb1
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}