Skip to content

Commit fc55a3a

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Add check in case parent element is undefined.
1 parent 11f7c7e commit fc55a3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6959,7 +6959,7 @@ export abstract class IgxGridBaseDirective implements GridType,
69596959
protected _shouldAutoSize() {
69606960

69616961
const parentElement = this.nativeElement.parentElement || (this.nativeElement.getRootNode() as any).host;
6962-
const parentHeight = parentElement.clientHeight;
6962+
const parentHeight = parentElement?.clientHeight;
69636963
this.tbody.nativeElement.style.display = 'none';
69646964
let res = !parentElement ||
69656965
parentElement.clientHeight === 0 ||

0 commit comments

Comments
 (0)