]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix: vnode key ref should default to null
authorEvan You <yyx990803@gmail.com>
Thu, 6 Jun 2019 05:04:31 +0000 (13:04 +0800)
committerEvan You <yyx990803@gmail.com>
Thu, 6 Jun 2019 05:04:31 +0000 (13:04 +0800)
packages/runtime-core/src/vnode.ts

index 66dc226fc76462b635b64d253b380c429ef31d6d..862bded0368b7455befad4b5f582989cb51f6202 100644 (file)
@@ -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,