From 32ea650c6ff9384e7e1efc34dde881562dd04123 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 9 May 2023 12:26:15 +0300 Subject: [PATCH] Fix IntersectionObserver error for server --- src/app/app.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index eb0ec11..0f677b6 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -162,7 +162,7 @@ export class AppComponent { this.subscriptions.forEach(value => { if (value instanceof Subscriber) { value.unsubscribe(); - } else if (value instanceof IntersectionObserver) { + } else if (typeof IntersectionObserver !== "undefined" && value instanceof IntersectionObserver) { value.disconnect(); } });