]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(devtools): make el extra properties non-enumerable
authorGuillaume Chau <guillaume.b.chau@gmail.com>
Sat, 29 Aug 2020 03:00:38 +0000 (05:00 +0200)
committerGuillaume Chau <guillaume.b.chau@gmail.com>
Sat, 29 Aug 2020 03:00:38 +0000 (05:00 +0200)
packages/runtime-core/src/renderer.ts

index ba8c8636c046156814be161f0d8e3e55be2d83fc..cae1ffe57c14f3283e525b85f7bcd9dfdf03b969 100644 (file)
@@ -756,8 +756,14 @@ function baseCreateRenderer(
       }
     }
     if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
-      el.__vnode = vnode
-      el.__vueParentComponent = parentComponent
+      Object.defineProperty(el, '__vnode', {
+        value: vnode,
+        enumerable: false
+      })
+      Object.defineProperty(el, '__vueParentComponent', {
+        value: parentComponent,
+        enumerable: false
+      })
     }
     if (dirs) {
       invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount')