From: Evan You Date: Thu, 6 Jun 2019 05:04:31 +0000 (+0800) Subject: fix: vnode key ref should default to null X-Git-Tag: v3.0.0-alpha.0~948 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=693938d956572e4651eaa27f476f94fc890a2b00;p=thirdparty%2Fvuejs%2Fcore.git fix: vnode key ref should default to null --- diff --git a/packages/runtime-core/src/vnode.ts b/packages/runtime-core/src/vnode.ts index 66dc226fc7..862bded036 100644 --- a/packages/runtime-core/src/vnode.ts +++ b/packages/runtime-core/src/vnode.ts @@ -119,8 +119,8 @@ export function createVNode( const vnode: VNode = { type, props, - key: props && props.key, - ref: props && props.ref, + key: (props && props.key) || null, + ref: (props && props.ref) || null, children: null, component: null, el: null,