Skip to content

Commit cc9d448

Browse files
committed
chore(*): Make sure there is grid before looking for columns
1 parent e791be9 commit cc9d448

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/igniteui-angular/src/lib/data-operations/sorting-strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export class IgxSorting implements IGridSortingStrategy {
160160
let result = [];
161161
while (i < data.length) {
162162
const group = this.groupedRecordsByExpression(data, i, expressions[level]);
163-
const column = grid.getColumnByName(expressions[level].fieldName);
163+
const column = grid ? grid.getColumnByName(expressions[level].fieldName) : null;
164164
const groupRow: IGroupByRecord = {
165165
expression: expressions[level],
166166
level,

0 commit comments

Comments
 (0)