Skip to content

Commit

Permalink
fix(runtime-core): handle patch flag de-op from cloned vnode
Browse files Browse the repository at this point in the history
close #1426
  • Loading branch information
yyx990803 committed Jun 26, 2020
1 parent f3f94e4 commit 0dd5cde
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0dd5cde

Please sign in to comment.