Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): createClientOnly extends $attrs when use Fragment #7849

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/nuxt/src/app/components/client-only.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function createClientOnly (component) {
// override the component render (non script setup component)
clone.render = (ctx, ...args) => {
return ctx.mounted$
? h(Fragment, ctx.$attrs ?? ctx._.attrs, component.render(ctx, ...args))
? h(Fragment, null, [h(component.render(ctx, ...args), ctx.$attrs ?? ctx._.attrs)])
: h('div', ctx.$attrs ?? ctx._.attrs)
}
} else if (clone.template) {
Expand Down