@@ -944,13 +944,13 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
944
944
} while ( true ) ;
945
945
946
946
// We're done performing work. Time to clean up.
947
- let didCompleteRoot = null ;
947
+ let didCompleteRoot = false ;
948
+ isWorking = false ;
948
949
949
950
// Yield back to main thread.
950
951
if ( didFatal ) {
951
952
stopWorkLoopTimer ( interruptedBy , didCompleteRoot ) ;
952
953
interruptedBy = null ;
953
- isWorking = false ;
954
954
// There was a fatal error.
955
955
if ( __DEV__ ) {
956
956
stack . resetStackAfterFatalErrorInDev ( ) ;
@@ -962,7 +962,6 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
962
962
didCompleteRoot = true ;
963
963
stopWorkLoopTimer ( interruptedBy , didCompleteRoot ) ;
964
964
interruptedBy = null ;
965
- isWorking = false ;
966
965
// The root successfully completed. It's ready for commit.
967
966
root . pendingCommitExpirationTime = expirationTime ;
968
967
const finishedWork = root . current . alternate ;
@@ -971,7 +970,6 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
971
970
// The root did not complete.
972
971
stopWorkLoopTimer ( interruptedBy , didCompleteRoot ) ;
973
972
interruptedBy = null ;
974
- isWorking = false ;
975
973
invariant (
976
974
false ,
977
975
'Expired work should have completed. This error is likely caused ' +
@@ -981,7 +979,6 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
981
979
} else {
982
980
stopWorkLoopTimer ( interruptedBy , didCompleteRoot ) ;
983
981
interruptedBy = null ;
984
- isWorking = false ;
985
982
// There's more work to do, but we ran out of time. Yield back to
986
983
// the renderer.
987
984
return null ;
0 commit comments