Skip to content

Commit

Permalink
fix(devtools): make el extra properties non-enumerable
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Aug 29, 2020
1 parent 38ca7e8 commit 7fd3436
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

1 comment on commit 7fd3436

@9mm
Copy link

@9mm 9mm commented on 7fd3436 Sep 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I get devtools to work with 3.0 to begin with? It just says vue.js not detected

Please sign in to comment.