diff --git a/src/auro-back-to-top.js b/src/auro-back-to-top.js index 3120133..068c5d1 100644 --- a/src/auro-back-to-top.js +++ b/src/auro-back-to-top.js @@ -67,8 +67,8 @@ class AuroBackToTop extends LitElement { } firstUpdated() { - this.visible = !IntersectionObserver || this.inline; - if (!IntersectionObserver || this.inline) { + this.visible = !('IntersectionObserver' in window) || this.inline; + if (!('IntersectionObserver' in window) || this.inline) { return } const observer = new IntersectionObserver((entries) => {