Add condition for observer to avoid server error

This commit is contained in:
Konstantinos Triantafyllou 2022-05-06 10:53:02 +03:00
parent 4a6d39d4e9
commit 02de663dd2
1 changed files with 3 additions and 1 deletions

View File

@ -287,7 +287,9 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit{
}
ngAfterViewInit() {
this.createObserver();
if(typeof window !== "undefined") {
this.createObserver();
}
}
createObserver() {