Skip to content

Commit

Permalink
fix(runtime-core): Check asyncDep instead of subTree
Browse files Browse the repository at this point in the history
The null el can also happen during client rendering
  • Loading branch information
mmis1000 committed Oct 24, 2023
1 parent d0d026f commit 084c2a4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1446,9 +1446,8 @@ function baseCreateRenderer(
): ComponentInternalInstance | null => {
if (instance.subTree.shapeFlag & ShapeFlags.COMPONENT) {
if (
// this happens only during hydration
instance.subTree.component?.subTree == null &&
// we don't know the subTree yet because we haven't resolve it
// this happens during hydration or updating a component that resolve to a unresolved async component
instance.subTree.component?.asyncDep != null &&
instance.subTree.component?.asyncResolved === false
) {
return instance.subTree.component!
Expand Down

0 comments on commit 084c2a4

Please sign in to comment.