fix: return component when server-side

This commit is contained in:
Michael Brevard 2024-06-02 17:13:03 +03:00 committed by GitHub
parent fa46fe3e4f
commit b1e66e5c05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,6 +64,11 @@ export const createLazyNetworkClientPage = (componentLoader: Component) => {
return defineComponent({
inheritAttrs: false,
setup (_, { attrs }) {
if (import.meta.server) {
return () => h('div', {}, [
h(componentLoader, attrs),
])
}
const nuxt = useNuxtApp()
const instance = getCurrentInstance()!
let vnode: VNode | null = null