]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(ssr): always hydrate children for HMR (#5406)
authorAnthony Fu <anthonyfu117@hotmail.com>
Sat, 12 Feb 2022 08:24:19 +0000 (16:24 +0800)
committerGitHub <noreply@github.com>
Sat, 12 Feb 2022 08:24:19 +0000 (03:24 -0500)
fix #5405

packages/runtime-core/src/hydration.ts

index f405aac45fa5a988732d5bb3588ceb7a0ff91f51..ef66f0d3fe6021da227222a6254e84426eaffec6 100644 (file)
@@ -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')
       }