diff --git a/web/src/lib/components/asset-viewer/intersection-observer.svelte b/web/src/lib/components/asset-viewer/intersection-observer.svelte index 707059438f..f75d35d5f6 100644 --- a/web/src/lib/components/asset-viewer/intersection-observer.svelte +++ b/web/src/lib/components/asset-viewer/intersection-observer.svelte @@ -18,7 +18,7 @@ const rootMargin = `${top}px ${right}px ${bottom}px ${left}px`; const observer = new IntersectionObserver( (entries) => { - intersecting = entries[0].isIntersecting; + intersecting = entries.some((entry) => entry.isIntersecting); if (!intersecting) { dispatch('hidden', container); }