Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f080c42

Browse files
committed
fix(nuxt): init payload when using islands with ssr: false
1 parent 8010b04 commit f080c42

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/nuxt/src/app/components/nuxt-island.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export default defineComponent({
119119
if (import.meta.client && nuxtApp.isHydrating) {
120120
ssrHTML.value = getFragmentHTML(instance.vnode?.el ?? null, true)?.join('') || ''
121121
const key = `${props.name}_${hashId.value}`
122+
nuxtApp.payload.data[key] ||= {}
122123
nuxtApp.payload.data[key].html = ssrHTML.value
123124
}
124125

0 commit comments

Comments
 (0)