Skip to content

Commit 395f8b9

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Add check for target in case activating and pinning simultaneously.
1 parent 0bb02b4 commit 395f8b9

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

projects/igniteui-angular/src/lib/grids/grid/grid.pipes.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,15 @@ export class IgxGridUnmergeActivePipe implements PipeTransform {
114114
const rootsToUpdate = [];
115115
activeRowIndexes.forEach(index => {
116116
const target = collection[index];
117-
colsToMerge.forEach(col => {
118-
const colMeta = target.cellMergeMeta.get(col.field);
119-
const root = colMeta.root || (colMeta.rowSpan > 1 ? target : null);
120-
if (root) {
121-
rootsToUpdate.push(root);
122-
}
123-
});
117+
if (target) {
118+
colsToMerge.forEach(col => {
119+
const colMeta = target.cellMergeMeta.get(col.field);
120+
const root = colMeta.root || (colMeta.rowSpan > 1 ? target : null);
121+
if (root) {
122+
rootsToUpdate.push(root);
123+
}
124+
});
125+
}
124126
});
125127
const uniqueRoots = rootsToUpdate.filter((val, idx, arr) => arr.indexOf(val) === idx);
126128
if (uniqueRoots.length === 0) {

0 commit comments

Comments
 (0)