Skip to content

Commit 5477ee8

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Apply review comments. Use sets.
1 parent 395f8b9 commit 5477ee8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class IgxGridUnmergeActivePipe implements PipeTransform {
110110
if (this.grid.hasPinnedRecords && !pinned && this.grid.pinning.rows !== RowPinningPosition.Bottom) {
111111
activeRowIndexes = activeRowIndexes.map(x => x - this.grid.pinnedRecordsCount);
112112
}
113-
activeRowIndexes = activeRowIndexes.filter((val, idx, arr) => arr.indexOf(val) === idx).filter(x => !isNaN(x));
113+
activeRowIndexes = Array.from(new Set(activeRowIndexes)).filter(x => !isNaN(x));
114114
const rootsToUpdate = [];
115115
activeRowIndexes.forEach(index => {
116116
const target = collection[index];
@@ -124,7 +124,7 @@ export class IgxGridUnmergeActivePipe implements PipeTransform {
124124
});
125125
}
126126
});
127-
const uniqueRoots = rootsToUpdate.filter((val, idx, arr) => arr.indexOf(val) === idx);
127+
const uniqueRoots = Array.from(new Set(rootsToUpdate));
128128
if (uniqueRoots.length === 0) {
129129
// if nothing to update, return
130130
return collection;

0 commit comments

Comments
 (0)