From 18e4cea6dd04043d8ba3b4d13c76d31c6deb459b Mon Sep 17 00:00:00 2001 From: yangchangtao Date: Tue, 9 Jan 2024 11:41:12 +0800 Subject: [PATCH] fix: update fix --- packages/runtime-core/src/components/Suspense.ts | 1 - packages/runtime-core/src/renderer.ts | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/src/components/Suspense.ts b/packages/runtime-core/src/components/Suspense.ts index e7011fb2361..8d6ee16410a 100644 --- a/packages/runtime-core/src/components/Suspense.ts +++ b/packages/runtime-core/src/components/Suspense.ts @@ -863,7 +863,6 @@ export function queueEffectWithSuspense( function setActiveBranch(suspense: SuspenseBoundary, branch: VNode) { suspense.activeBranch = branch - if (!branch.el) return const { vnode, parentComponent } = suspense const el = (vnode.el = branch.el) // in case suspense is the root node of a component, diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index c7dfbf45dd2..f5eeef014de 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -2523,7 +2523,8 @@ function getSequence(arr: number[]): number[] { function locateNonHydratedAsyncRoot( instance: ComponentInternalInstance, ): ComponentInternalInstance | undefined { - const subComponent = instance.subTree.component + const subComponent = + instance.subTree.component || instance.subTree.ssContent?.component if (subComponent) { if (subComponent.asyncDep && !subComponent.asyncResolved) { return subComponent