fix: return render function and not vnode directly

This commit is contained in:
julien huang 2024-04-13 20:14:36 +02:00
parent 162908aac0
commit fd0adea179

View File

@ -18,9 +18,9 @@ function elementIsVisibleInViewport (el: Element) {
export const createLazyIOClientPage = (componentLoader: Component) => {
return defineComponent({
inheritAttrs: false,
setup (_, { attrs }) {
setup (_, { attrs }) {
if (import.meta.server) {
return h('div', {}, [
return () => h('div', {}, [
h(componentLoader, attrs),
])
}