Skip to content

Commit 0342fae

Browse files
authoredFeb 12, 2022
fix(ssr): always hydrate children for HMR (#5406)
fix #5405
1 parent 15adf25 commit 0342fae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎packages/runtime-core/src/hydration.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ export function createHydrationFunctions(
273273
// e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
274274
const forcePatchValue = (type === 'input' && dirs) || type === 'option'
275275
// skip props & children if this is hoisted static nodes
276-
if (forcePatchValue || patchFlag !== PatchFlags.HOISTED) {
276+
// #5405 in dev, always hydrate children for HMR
277+
if (__DEV__ || forcePatchValue || patchFlag !== PatchFlags.HOISTED) {
277278
if (dirs) {
278279
invokeDirectiveHook(vnode, null, parentComponent, 'created')
279280
}

0 commit comments

Comments
 (0)
Please sign in to comment.