Skip to content

Commit 366a4be

Browse files
author
mledour
committed
fix(header): header service offsetHeight close#39
1 parent 7a3d3df commit 366a4be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/angular-admin-lte/src/lib/layout/header/header.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ export class HeaderService {
1010
* @return [description]
1111
*/
1212
public get offsetHeight(): number {
13-
return this.elementRef.nativeElement.offsetHeight;
13+
return this.elementRef ? this.elementRef.nativeElement.offsetHeight : 0;
1414
}
1515
}

0 commit comments

Comments
 (0)