From 6bbaa39a7437cf2489cded82d585c12eb4d38153 Mon Sep 17 00:00:00 2001 From: Chris Dhanaraj Date: Thu, 13 Jul 2017 09:23:13 -0500 Subject: [PATCH] fix(overflow): use React.Children.toArray to discard null values (#90) --- components/OverflowMenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/OverflowMenu.js b/components/OverflowMenu.js index df61fb7efb..1c67ce244e 100644 --- a/components/OverflowMenu.js +++ b/components/OverflowMenu.js @@ -124,7 +124,7 @@ class OverflowMenu extends Component { iconClass ); - const childrenWithProps = React.Children.map(children, child => + const childrenWithProps = React.Children.toArray(children).map(child => React.cloneElement(child, { closeMenu: this.closeMenu, })