Skip to content

Commit

Permalink
chore(*): Add null check.
Browse files Browse the repository at this point in the history
  • Loading branch information
MKirova authored and MKirova committed Feb 4, 2025
1 parent 7af66d4 commit 6c3d727
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ export class IgxGridCRUDService extends IgxRowAddCrudState {
}
this.endEdit(true, event);
// work with copy of original row, since context may change on collapse.
const parentRowCopy = Object.assign(copyDescriptors(parentRow), parentRow);
const parentRowCopy = parentRow ? Object.assign(copyDescriptors(parentRow), parentRow) : null;
if (parentRowCopy != null && this.grid.expansionStates.get(parentRowCopy.key)) {
this.grid.collapseRow(parentRowCopy.key);
}
Expand Down

0 comments on commit 6c3d727

Please sign in to comment.