We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbc4505 commit ceaa304Copy full SHA for ceaa304
projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.component.ts
@@ -844,7 +844,7 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
844
const first = fields.keys().next().value;
845
const dim: IPivotDimension = fields.get(first).dimension;
846
let currentFields = fields;
847
- if (dim.sortDirection) {
+ if (dim && dim.sortDirection) {
848
const reverse = (dim.sortDirection === SortingDirection.Desc ? -1 : 1);
849
currentFields = new Map([...fields.entries()].sort((a, b) => reverse * (a > b ? 1 : a < b ? -1 : 0)));
850
}
0 commit comments