Skip to content

Commit f43bf6d

Browse files
committed
fix(Suspense): avoid unmount nested Suspense if parent suspense is not resolved
1 parent 972face commit f43bf6d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/runtime-core/src/components/Suspense.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,9 @@ function createSuspenseBoundary(
723723
},
724724

725725
unmount(parentSuspense, doRemove) {
726+
if (parentSuspense && parentSuspense.deps > 0) {
727+
return
728+
}
726729
suspense.isUnmounted = true
727730
if (suspense.activeBranch) {
728731
unmount(

0 commit comments

Comments
 (0)