Skip to content

Commit

Permalink
fix: hydration __vnode missing
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Oct 3, 2023
1 parent b8fc18c commit a6ae876
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/runtime-core/src/hydration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,17 @@ export function createHydrationFunctions(
let domType = node.nodeType
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 (patchFlag === PatchFlags.BAIL) {
optimized = false
vnode.dynamicChildren = null
Expand Down

0 comments on commit a6ae876

Please sign in to comment.