Skip to content

Commit

Permalink
fix(server-renderer): Scoped data attributes aren't passed down to fu…
Browse files Browse the repository at this point in the history
…nctional components vuejs#5817
  • Loading branch information
liulinboyi committed Apr 28, 2022
1 parent 4a3237a commit 3af421c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/server-renderer/src/helpers/ssrRenderComponent.ts
@@ -1,3 +1,4 @@
import { isFunction } from '@vue/shared'
import { Component, ComponentInternalInstance, createVNode, Slots } from 'vue'
import { Props, renderComponentVNode, SSRBuffer } from '../render'
import { SSRSlots } from './ssrRenderSlot'
Expand All @@ -10,7 +11,9 @@ export function ssrRenderComponent(
slotScopeId?: string
): SSRBuffer | Promise<SSRBuffer> {
return renderComponentVNode(
createVNode(comp, props, children),
isFunction(comp) && parentComponent
? (parentComponent.subTree = createVNode(comp, props, children))
: createVNode(comp, props, children),
parentComponent,
slotScopeId
)
Expand Down

0 comments on commit 3af421c

Please sign in to comment.