fix(runtime-core): cloned vnodes with extra props should de-opt

This commit is contained in:
Evan You
2020-05-01 14:55:27 -04:00
parent ac6a6f11ac
commit 08bf7e3607
4 changed files with 16 additions and 10 deletions

View File

@@ -354,6 +354,11 @@ function baseCreateRenderer(
n1 = null
}
if (n2.patchFlag === PatchFlags.BAIL) {
optimized = false
n2.dynamicChildren = null
}
const { type, ref, shapeFlag } = n2
switch (type) {
case Text:
@@ -1280,9 +1285,6 @@ function baseCreateRenderer(
const c2 = n2.children
const { patchFlag, shapeFlag } = n2
if (patchFlag === PatchFlags.BAIL) {
optimized = false
}
// fast path
if (patchFlag > 0) {
if (patchFlag & PatchFlags.KEYED_FRAGMENT) {