Skip to content

Commit

Permalink
fix: removed undefined parent (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
flops authored Jul 22, 2024
1 parent f91752e commit 0286e01
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/GridLayout/GridLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,13 @@ export default class GridLayout extends React.PureComponent {

const newItemsLayoutById = newLayout.reduce((memo, item) => {
const parent = itemsByGroup[item.i].parent;
memo[item.i] = {...item, parent};

memo[item.i] = {...item};

if (parent) {
memo[item.i].parent = parent;
}

return memo;
}, {});

Expand Down

0 comments on commit 0286e01

Please sign in to comment.