Add condition for observer to avoid server error
This commit is contained in:
parent
4a6d39d4e9
commit
02de663dd2
|
@ -287,7 +287,9 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit{
|
|||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.createObserver();
|
||||
if(typeof window !== "undefined") {
|
||||
this.createObserver();
|
||||
}
|
||||
}
|
||||
|
||||
createObserver() {
|
||||
|
|
Loading…
Reference in New Issue