diff --git a/app/src/components/v-image.vue b/app/src/components/v-image.vue index 082c4f6f57..4dc90bbb7f 100644 --- a/app/src/components/v-image.vue +++ b/app/src/components/v-image.vue @@ -25,15 +25,17 @@ const srcData = ref(emptyPixel); let loaded = false; -const observer = new IntersectionObserver(async (entries) => { +const observer = new IntersectionObserver((entries) => { if (entries.length === 0) return; - inView.value = entries[0].isIntersecting; - if (entries[0].isIntersecting && !loaded && props.src) { + const isIntersecting = entries.at(-1)!.isIntersecting; + + inView.value = isIntersecting; + + if (isIntersecting && !loaded && props.src) { loadImage(); } }); - watch( () => props.src, () => {