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