mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 17:07:22 +00:00
fix: return component when server-side
This commit is contained in:
parent
fa46fe3e4f
commit
b1e66e5c05
@ -64,6 +64,11 @@ export const createLazyNetworkClientPage = (componentLoader: Component) => {
|
|||||||
return defineComponent({
|
return defineComponent({
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
setup (_, { attrs }) {
|
setup (_, { attrs }) {
|
||||||
|
if (import.meta.server) {
|
||||||
|
return () => h('div', {}, [
|
||||||
|
h(componentLoader, attrs),
|
||||||
|
])
|
||||||
|
}
|
||||||
const nuxt = useNuxtApp()
|
const nuxt = useNuxtApp()
|
||||||
const instance = getCurrentInstance()!
|
const instance = getCurrentInstance()!
|
||||||
let vnode: VNode | null = null
|
let vnode: VNode | null = null
|
||||||
|
Loading…
Reference in New Issue
Block a user