Skip to content

Commit 2fa91b3

Browse files
Merge pull request #16295 from IgniteUI/mtihova/fix-16293
Prevent TypeError when accessing selection.keys() in certain environments
1 parent 706b462 commit 2fa91b3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4106,7 +4106,10 @@ export abstract class IgxGridBaseDirective implements GridType,
41064106
return this._activeRowIndexes;
41074107
} else {
41084108
const activeRow = this.navigation.activeNode?.row;
4109-
const selectedCellIndexes = (this.selectionService.selection?.keys() as any)?.toArray();
4109+
4110+
const selectedCellIndexes = this.selectionService.selection
4111+
? Array.from(this.selectionService.selection.keys())
4112+
: [];
41104113
this._activeRowIndexes = [activeRow, ...selectedCellIndexes];
41114114
return this._activeRowIndexes;
41124115
}

0 commit comments

Comments
 (0)