fix(devtools): make el extra properties non-enumerable

This commit is contained in:
Guillaume Chau 2020-08-29 05:00:38 +02:00
parent 38ca7e8e4e
commit 7fd3436290

View 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')