From: Evan You Date: Fri, 26 Jun 2020 22:05:53 +0000 (-0400) Subject: fix(runtime-core): handle patch flag de-op from cloned vnode X-Git-Tag: v3.0.0-beta.16~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0dd5cde861735e80cfe21537380e52789cc865f8;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): handle patch flag de-op from cloned vnode close #1426 --- diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index edc00d1750..4dfc2ab663 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -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