mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix: verify none null
This commit is contained in:
parent
dc6d922773
commit
2ee3cf53ee
@ -13,8 +13,8 @@ export const createLazyIOClientPage = (componentLoader: Component) => {
|
||||
const nuxt = useNuxtApp()
|
||||
const instance = getCurrentInstance()!
|
||||
let vnode: VNode | null = null
|
||||
if (import.meta.client && nuxt.isHydrating) {
|
||||
vnode = createStaticVNode(getFragmentHTML(instance.vnode.el).join(''), 1)
|
||||
if (import.meta.client && nuxt.isHydrating && instance.vnode?.el) {
|
||||
vnode = createStaticVNode(getFragmentHTML(instance.vnode.el).join('') || '', 1)
|
||||
}
|
||||
const isIntersecting = ref(false)
|
||||
const el: Ref<Element | null> = ref(null)
|
||||
@ -46,8 +46,8 @@ export const createLazyNetworkClientPage = (componentLoader: Component) => {
|
||||
const nuxt = useNuxtApp()
|
||||
const instance = getCurrentInstance()!
|
||||
let vnode: VNode | null = null
|
||||
if (import.meta.client && nuxt.isHydrating) {
|
||||
vnode = createStaticVNode(getFragmentHTML(instance.vnode.el).join(''), 1)
|
||||
if (import.meta.client && nuxt.isHydrating && instance.vnode?.el) {
|
||||
vnode = createStaticVNode(getFragmentHTML(instance.vnode.el).join('') || '', 1)
|
||||
}
|
||||
const isIdle = ref(false)
|
||||
let idleHandle: number | null = null
|
||||
|
Loading…
Reference in New Issue
Block a user