Skip to content

Commit 5d78e4e

Browse files
committed
fix(grid): add null check for activeNode
1 parent 039f391 commit 5d78e4e

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
@@ -151,7 +151,7 @@ export class IgxGridHeaderGroupComponent implements DoCheck {
151151
* @hidden
152152
*/
153153
public get ariaHidden(): boolean {
154-
return this.grid.hasColumnGroups && (this.column.hidden || this.grid.navigation.activeNode.row !== -1);
154+
return this.grid.hasColumnGroups && (this.column.hidden || this.grid.navigation.activeNode?.row !== -1);
155155
}
156156

157157
/**

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
@@ -123,7 +123,7 @@ export class IgxGridHeaderRowComponent implements DoCheck {
123123
* @internal
124124
*/
125125
public get isLeafHeaderAriaHidden(): boolean {
126-
return this.grid.navigation.activeNode.row === -1;
126+
return this.grid.navigation.activeNode?.row === -1;
127127
}
128128

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

0 commit comments

Comments
 (0)