]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): fix missed updates when passing vnode to <component :is>
authorEvan You <yyx990803@gmail.com>
Thu, 12 May 2022 09:52:15 +0000 (17:52 +0800)
committerEvan You <yyx990803@gmail.com>
Thu, 12 May 2022 09:52:17 +0000 (17:52 +0800)
fix #4903

packages/runtime-core/src/vnode.ts

index 60ea0f718cfd32063451d4cfe4b1f1e54ca41020..0a2543a70e7e74a07fc371b3652d57e4f8c17a27 100644 (file)
@@ -510,6 +510,14 @@ function _createVNode(
     if (children) {
       normalizeChildren(cloned, children)
     }
+    if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
+      if (cloned.shapeFlag & ShapeFlags.COMPONENT) {
+        currentBlock[currentBlock.indexOf(type)] = cloned
+      } else {
+        currentBlock.push(cloned)
+      }
+    }
+    cloned.patchFlag |= PatchFlags.BAIL
     return cloned
   }