mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 15:50:32 +00:00
fix: ensure observer is not undefined
This commit is contained in:
parent
966c17be72
commit
f6ba2255e6
@ -12,7 +12,7 @@ export const createLazyIOClientPage = (componentLoader: Component) => {
|
||||
let unobserve: (() => void) | null = null
|
||||
onMounted(() => {
|
||||
const observer = useObserver()
|
||||
unobserve = observer.observe(el.value as Element, () => {
|
||||
unobserve = observer!.observe(el.value as Element, () => {
|
||||
isIntersecting.value = true
|
||||
unobserve?.()
|
||||
unobserve = null
|
||||
|
Loading…
Reference in New Issue
Block a user