File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -380,8 +380,8 @@ describe('Suspense', () => {
380
380
await Promise . all ( deps )
381
381
await nextTick ( )
382
382
expect ( serializeInner ( root ) ) . toBe ( `<!---->` )
383
- // should discard effects (except for unmount)
384
- expect ( calls ) . toEqual ( [ 'unmounted' ] )
383
+ // should discard effects
384
+ expect ( calls ) . toEqual ( [ ] )
385
385
} )
386
386
387
387
test ( 'unmount suspense after resolve' , async ( ) => {
Original file line number Diff line number Diff line change @@ -201,11 +201,12 @@ function patchSuspense(
201
201
suspense . isHydrating = false
202
202
suspense . activeBranch = pendingBranch
203
203
} else {
204
- unmount ( pendingBranch , parentComponent , null )
204
+ unmount ( pendingBranch , parentComponent , suspense )
205
205
}
206
206
// increment pending ID. this is used to invalidate async callbacks
207
207
// reset suspense state
208
208
suspense . deps = 0
209
+ // discard effects from pending branch
209
210
suspense . effects . length = 0
210
211
// discard previous container
211
212
suspense . hiddenContainer = createElement ( 'div' )
You can’t perform that action at this time.
0 commit comments