File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -380,8 +380,8 @@ describe('Suspense', () => {
380380 await Promise . all ( deps )
381381 await nextTick ( )
382382 expect ( serializeInner ( root ) ) . toBe ( `<!---->` )
383- // should discard effects (except for unmount)
384- expect ( calls ) . toEqual ( [ 'unmounted' ] )
383+ // should discard effects
384+ expect ( calls ) . toEqual ( [ ] )
385385 } )
386386
387387 test ( 'unmount suspense after resolve' , async ( ) => {
Original file line number Diff line number Diff line change @@ -201,11 +201,12 @@ function patchSuspense(
201201 suspense . isHydrating = false
202202 suspense . activeBranch = pendingBranch
203203 } else {
204- unmount ( pendingBranch , parentComponent , null )
204+ unmount ( pendingBranch , parentComponent , suspense )
205205 }
206206 // increment pending ID. this is used to invalidate async callbacks
207207 // reset suspense state
208208 suspense . deps = 0
209+ // discard effects from pending branch
209210 suspense . effects . length = 0
210211 // discard previous container
211212 suspense . hiddenContainer = createElement ( 'div' )
You can’t perform that action at this time.
0 commit comments