@@ -232,7 +232,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
232
232
let isUnmounting : boolean = false ;
233
233
234
234
// Use these to prevent an infinite loop of nested updates
235
- let didCommit = false ;
236
235
let nestedSyncUpdates = 0 ;
237
236
let NESTED_SYNC_UPDATE_LIMIT = 1000 ;
238
237
@@ -291,9 +290,8 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
291
290
priorityContext = nextPriorityLevel ;
292
291
293
292
if (
294
- didCommit &&
295
- ( nextPriorityLevel === TaskPriority ||
296
- nextPriorityLevel === SynchronousPriority )
293
+ nextPriorityLevel === TaskPriority ||
294
+ nextPriorityLevel === SynchronousPriority
297
295
) {
298
296
invariant (
299
297
nestedSyncUpdates ++ <= NESTED_SYNC_UPDATE_LIMIT ,
@@ -434,7 +432,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
434
432
// local to this function is because errors that occur during cWU are
435
433
// captured elsewhere, to prevent the unmount from being interrupted.
436
434
isCommitting = true ;
437
- didCommit = true ;
438
435
if ( __DEV__ ) {
439
436
startCommitTimer ( ) ;
440
437
}
@@ -1011,7 +1008,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
1011
1008
firstUncaughtError = null ;
1012
1009
capturedErrors = null ;
1013
1010
failedBoundaries = null ;
1014
- didCommit = false ;
1015
1011
nestedSyncUpdates = 0 ;
1016
1012
if ( __DEV__ ) {
1017
1013
stopWorkLoopTimer ( ) ;
0 commit comments