fix(ssr): should de-optimize on vnode with PatchFlags.BAIL (#4818)

fix #4679
fix #5771
This commit is contained in:
edison
2022-05-10 18:35:34 +08:00
committed by GitHub
parent 410144149f
commit cd659fc86f
2 changed files with 8 additions and 3 deletions

View File

@@ -97,10 +97,15 @@ export function createHydrationFunctions(
isFragmentStart
)
const { type, ref, shapeFlag } = vnode
const { type, ref, shapeFlag, patchFlag } = vnode
const domType = node.nodeType
vnode.el = node
if (patchFlag === PatchFlags.BAIL) {
optimized = false
vnode.dynamicChildren = null
}
let nextNode: Node | null = null
switch (type) {
case Text: