Skip to content

Commit 0dd5cde

Browse files
committed
fix(runtime-core): handle patch flag de-op from cloned vnode
close #1426
1 parent f3f94e4 commit 0dd5cde

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/runtime-core/src/renderer.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,10 @@ function baseCreateRenderer(
780780
) => {
781781
const el = (n2.el = n1.el!)
782782
let { patchFlag, dynamicChildren, dirs } = n2
783-
const oldProps = (n1 && n1.props) || EMPTY_OBJ
783+
// #1426 take the old vnode's patch flag into account since user may clone a
784+
// compiler-generated vnode, which de-opts to FULL_PROPS
785+
patchFlag |= n1.patchFlag & PatchFlags.FULL_PROPS
786+
const oldProps = n1.props || EMPTY_OBJ
784787
const newProps = n2.props || EMPTY_OBJ
785788
let vnodeHook: VNodeHook | undefined | null
786789

0 commit comments

Comments
 (0)