Skip to content

Commit e1399d6

Browse files
committed
fix(Suspense): avoid unmount nested Suspense if parent suspense is not resolved
1 parent ffd0473 commit e1399d6

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
@@ -735,6 +735,9 @@ function createSuspenseBoundary(
735735
},
736736

737737
unmount(parentSuspense, doRemove) {
738+
if (parentSuspense && parentSuspense.deps > 0) {
739+
return
740+
}
738741
suspense.isUnmounted = true
739742
if (suspense.activeBranch) {
740743
unmount(

0 commit comments

Comments
 (0)