Skip to content

Commit cfa3fb0

Browse files
committed
fix(grid): add null check for activeNode
1 parent 9501b65 commit cfa3fb0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

projects/igniteui-angular/src/lib/grids/grid/column-group.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ describe('IgxGrid - multi-column headers #grid', () => {
218218

219219
const gridContent = GridFunctions.getGridContent(fixture);
220220

221-
expect(async () => {
221+
expect(() => {
222222
gridContent.triggerEventHandler('focus', null);
223-
await wait(400);
223+
tick(400);
224224
fixture.detectChanges();
225225
}).not.toThrow();
226226
}));

projects/igniteui-angular/src/lib/grids/headers/grid-header-group.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export class IgxGridHeaderGroupComponent implements DoCheck {
161161
* @hidden
162162
*/
163163
public get ariaHidden(): boolean {
164-
return this.grid.hasColumnGroups && (this.column.hidden || this.grid.navigation.activeNode.row !== -1);
164+
return this.grid.hasColumnGroups && (this.column.hidden || this.grid.navigation.activeNode?.row !== -1);
165165
}
166166

167167
/**

projects/igniteui-angular/src/lib/grids/headers/grid-header-row.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export class IgxGridHeaderRowComponent implements DoCheck {
118118
* @internal
119119
*/
120120
public get isLeafHeaderAriaHidden(): boolean {
121-
return this.grid.navigation.activeNode.row === -1;
121+
return this.grid.navigation.activeNode?.row === -1;
122122
}
123123

124124
/** The virtualized part of the header row containing the unpinned header groups. */

0 commit comments

Comments
 (0)