Skip to content

Commit

Permalink
fix(runtime-core): Fix client side suspense hydration masmatch in pro…
Browse files Browse the repository at this point in the history
…per way
  • Loading branch information
mmis1000 committed Oct 27, 2023
1 parent 2c5447b commit 75569ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,7 @@ function baseCreateRenderer(
if (!initialVNode.el) {
const placeholder = (instance.subTree = createVNode(Comment))
processCommentNode(null, placeholder, container!, anchor)
initialVNode.el = placeholder.el
}
return
}
Expand Down Expand Up @@ -1446,8 +1447,9 @@ function baseCreateRenderer(
): ComponentInternalInstance | null => {
if (instance.subTree.shapeFlag & ShapeFlags.COMPONENT) {
if (
// this happens during hydration or updating a component that resolve to a unresolved async component
instance.subTree.component?.asyncDep != null &&
// this happens only during hydration
instance.subTree.component?.subTree == null &&
// we don't know the subTree yet because we haven't resolve it
instance.subTree.component?.asyncResolved === false
) {
return instance.subTree.component!
Expand Down

0 comments on commit 75569ef

Please sign in to comment.