@@ -1504,7 +1504,7 @@ function resetWorkInProgressStack() {
15041504 } else {
15051505 // Work-in-progress is in suspended state. Reset the work loop and unwind
15061506 // both the suspended fiber and all its parents.
1507- resetSuspendedWorkLoopOnUnwind ( ) ;
1507+ resetSuspendedWorkLoopOnUnwind ( workInProgress ) ;
15081508 interruptedWork = workInProgress ;
15091509 }
15101510 while ( interruptedWork !== null ) {
@@ -1563,10 +1563,10 @@ function prepareFreshStack(root: FiberRoot, lanes: Lanes): Fiber {
15631563 return rootWorkInProgress ;
15641564}
15651565
1566- function resetSuspendedWorkLoopOnUnwind ( ) {
1566+ function resetSuspendedWorkLoopOnUnwind ( fiber : Fiber ) {
15671567 // Reset module-level state that was set during the render phase.
15681568 resetContextDependencies ( ) ;
1569- resetHooksOnUnwind ( ) ;
1569+ resetHooksOnUnwind ( fiber ) ;
15701570 resetChildReconcilerOnUnwind ( ) ;
15711571}
15721572
@@ -2337,7 +2337,7 @@ function replaySuspendedUnitOfWork(unitOfWork: Fiber): void {
23372337 // is to reuse uncached promises, but we happen to know that the only
23382338 // promises that a host component might suspend on are definitely cached
23392339 // because they are controlled by us. So don't bother.
2340- resetHooksOnUnwind ( ) ;
2340+ resetHooksOnUnwind ( unitOfWork ) ;
23412341 // Fallthrough to the next branch.
23422342 }
23432343 default : {
@@ -2383,7 +2383,7 @@ function throwAndUnwindWorkLoop(unitOfWork: Fiber, thrownValue: mixed) {
23832383 //
23842384 // Return to the normal work loop. This will unwind the stack, and potentially
23852385 // result in showing a fallback.
2386- resetSuspendedWorkLoopOnUnwind ( ) ;
2386+ resetSuspendedWorkLoopOnUnwind ( unitOfWork ) ;
23872387
23882388 const returnFiber = unitOfWork . return ;
23892389 if ( returnFiber === null || workInProgressRoot === null ) {
@@ -3744,7 +3744,7 @@ if (__DEV__ && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
37443744 // same fiber again.
37453745
37463746 // Unwind the failed stack frame
3747- resetSuspendedWorkLoopOnUnwind ( ) ;
3747+ resetSuspendedWorkLoopOnUnwind ( unitOfWork ) ;
37483748 unwindInterruptedWork ( current , unitOfWork, workInProgressRootRenderLanes ) ;
37493749
37503750 // Restore the original properties of the fiber.
0 commit comments