fix(ssr): fix hydration error when transition contains comment children
fix #5351
This commit is contained in:
parent
aed10c5072
commit
3705b3b46a
@ -35,7 +35,8 @@ import {
|
||||
CREATE_VNODE,
|
||||
CallExpression,
|
||||
JSChildNode,
|
||||
RESOLVE_DYNAMIC_COMPONENT
|
||||
RESOLVE_DYNAMIC_COMPONENT,
|
||||
TRANSITION
|
||||
} from '@vue/compiler-dom'
|
||||
import { SSR_RENDER_COMPONENT, SSR_RENDER_VNODE } from '../runtimeHelpers'
|
||||
import {
|
||||
@ -213,6 +214,10 @@ export function ssrProcessComponent(
|
||||
if ((parent as WIPSlotEntry).type === WIP_SLOT) {
|
||||
context.pushStringPart(``)
|
||||
}
|
||||
// #5351: filter out comment children inside transition
|
||||
if (component === TRANSITION) {
|
||||
node.children = node.children.filter(c => c.type !== NodeTypes.COMMENT)
|
||||
}
|
||||
processChildren(node, context)
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user