Skip to content

Commit

Permalink
fix(nuxt): init payload when using islands with ssr: false
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Mar 13, 2024
1 parent 8010b04 commit f080c42
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/nuxt/src/app/components/nuxt-island.ts
Expand Up @@ -119,6 +119,7 @@ export default defineComponent({
if (import.meta.client && nuxtApp.isHydrating) {
ssrHTML.value = getFragmentHTML(instance.vnode?.el ?? null, true)?.join('') || ''
const key = `${props.name}_${hashId.value}`
nuxtApp.payload.data[key] ||= {}
nuxtApp.payload.data[key].html = ssrHTML.value
}

Expand Down

0 comments on commit f080c42

Please sign in to comment.