Skip to content

Commit ca47de1

Browse files
committed
fix: guard IntersectionObserver access in scroll-reveal
1 parent 85d46f5 commit ca47de1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/app/shared/directives/scroll-reveal/scroll-reveal.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ export class ScrollReveal {
2323
}
2424

2525
#observe(): void {
26+
if (typeof IntersectionObserver === 'undefined') {
27+
return;
28+
}
29+
2630
const el = this.#host.nativeElement;
2731

2832
const observer = new IntersectionObserver((entries) => {

0 commit comments

Comments
 (0)