Skip to content

Commit

Permalink
fix(ssr): always hydrate children for HMR
Browse files Browse the repository at this point in the history
fix #5405
  • Loading branch information
antfu committed Feb 11, 2022
1 parent 15adf25 commit f1a6a32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/runtime-core/src/hydration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ export function createHydrationFunctions(
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
const forcePatchValue = (type === 'input' && dirs) || type === 'option'
// skip props & children if this is hoisted static nodes
if (forcePatchValue || patchFlag !== PatchFlags.HOISTED) {
// #5405 in dev, always hydrate children for HMR
if (__DEV__ || forcePatchValue || patchFlag !== PatchFlags.HOISTED) {
if (dirs) {
invokeDirectiveHook(vnode, null, parentComponent, 'created')
}
Expand Down

0 comments on commit f1a6a32

Please sign in to comment.