Skip to content

Commit

Permalink
fix(runtime-core): fix missed updates when passing vnode to <componen…
Browse files Browse the repository at this point in the history
…t :is>

fix #4903
  • Loading branch information
yyx990803 committed May 12, 2022
1 parent 0f00cf4 commit ba17792
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/runtime-core/src/vnode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit ba17792

Please sign in to comment.