]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: comment on cloneVNode implementation [ci skip]
authorEvan You <yyx990803@gmail.com>
Mon, 28 Oct 2019 00:45:54 +0000 (20:45 -0400)
committerEvan You <yyx990803@gmail.com>
Mon, 28 Oct 2019 00:45:59 +0000 (20:45 -0400)
packages/runtime-core/src/vnode.ts

index 3293315c170397b0f8dc10ba521b92fbae750f31..98cdc0211f38ab914b891f3b9a3d52ac73012765 100644 (file)
@@ -233,6 +233,8 @@ export function createVNode(
 }
 
 export function cloneVNode(vnode: VNode, extraProps?: Data): VNode {
+  // This is intentionally NOT using spread or extend to avoid the runtime
+  // key enumeration cost.
   return {
     _isVNode: true,
     type: vnode.type,