Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Oct 3, 2023
1 parent a6ae876 commit 71dcdbc
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions packages/runtime-core/src/hydration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,18 @@ export function createHydrationFunctions(
vnode.el = node

if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
Object.defineProperty(node, '__vnode', {
value: vnode,
enumerable: false
})
Object.defineProperty(node, '__vueParentComponent', {
value: parentComponent,
enumerable: false
})
if (!('__vnode' in node)) {
Object.defineProperty(node, '__vnode', {
value: vnode,
enumerable: false
})
}
if (!('__vueParentComponent' in node)) {
Object.defineProperty(node, '__vueParentComponent', {
value: parentComponent,
enumerable: false
})
}
}

if (patchFlag === PatchFlags.BAIL) {
Expand Down

0 comments on commit 71dcdbc

Please sign in to comment.