Skip to content

Commit 5a7afc4

Browse files
ibrahimduranSTRML
authored andcommitted
changed condition to skip null items in processGridItem (react-grid-layout#578)
1 parent aacba5f commit 5a7afc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ReactGridLayout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ export default class ReactGridLayout extends React.Component<Props, State> {
544544
* @return {Element} Element wrapped in draggable and properly placed.
545545
*/
546546
processGridItem(child: ReactElement<any>): ?ReactElement<any> {
547-
if (!child.key) return;
547+
if (!child || !child.key) return;
548548
const l = getLayoutItem(this.state.layout, String(child.key));
549549
if (!l) return null;
550550
const {

0 commit comments

Comments
 (0)