fix(runtime-core): handle patch flag de-op from cloned vnode

close #1426
This commit is contained in:
Evan You 2020-06-26 18:05:53 -04:00
parent f3f94e4deb
commit 0dd5cde861

View File

@ -780,7 +780,10 @@ function baseCreateRenderer(
) => {
const el = (n2.el = n1.el!)
let { patchFlag, dynamicChildren, dirs } = n2
const oldProps = (n1 && n1.props) || EMPTY_OBJ
// #1426 take the old vnode's patch flag into account since user may clone a
// compiler-generated vnode, which de-opts to FULL_PROPS
patchFlag |= n1.patchFlag & PatchFlags.FULL_PROPS
const oldProps = n1.props || EMPTY_OBJ
const newProps = n2.props || EMPTY_OBJ
let vnodeHook: VNodeHook | undefined | null