Skip to content

Commit 7fd3436

Browse files
committed
fix(devtools): make el extra properties non-enumerable
1 parent 38ca7e8 commit 7fd3436

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/runtime-core/src/renderer.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -756,8 +756,14 @@ function baseCreateRenderer(
756756
}
757757
}
758758
if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
759-
el.__vnode = vnode
760-
el.__vueParentComponent = parentComponent
759+
Object.defineProperty(el, '__vnode', {
760+
value: vnode,
761+
enumerable: false
762+
})
763+
Object.defineProperty(el, '__vueParentComponent', {
764+
value: parentComponent,
765+
enumerable: false
766+
})
761767
}
762768
if (dirs) {
763769
invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount')

0 commit comments

Comments
 (0)