Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: update
  • Loading branch information
antfu committed Oct 3, 2023
commit 71dcdbc9b2bd5fbf2f910a1828b02caa86d09e03
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