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,8 +287,10 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit{
}
ngAfterViewInit() {
if(typeof window !== "undefined") {
this.createObserver();
}
}
createObserver() {
let mutationObserver = new MutationObserver(entries => {