diff --git a/src/renderers/shared/fiber/ReactFiberScheduler.js b/src/renderers/shared/fiber/ReactFiberScheduler.js index c7e8ec365a..998613be99 100644 --- a/src/renderers/shared/fiber/ReactFiberScheduler.js +++ b/src/renderers/shared/fiber/ReactFiberScheduler.js @@ -232,7 +232,6 @@ module.exports = function( let isUnmounting: boolean = false; // Use these to prevent an infinite loop of nested updates - let didCommit = false; let nestedSyncUpdates = 0; let NESTED_SYNC_UPDATE_LIMIT = 1000; @@ -291,9 +290,8 @@ module.exports = function( priorityContext = nextPriorityLevel; if ( - didCommit && - (nextPriorityLevel === TaskPriority || - nextPriorityLevel === SynchronousPriority) + nextPriorityLevel === TaskPriority || + nextPriorityLevel === SynchronousPriority ) { invariant( nestedSyncUpdates++ <= NESTED_SYNC_UPDATE_LIMIT, @@ -434,7 +432,6 @@ module.exports = function( // local to this function is because errors that occur during cWU are // captured elsewhere, to prevent the unmount from being interrupted. isCommitting = true; - didCommit = true; if (__DEV__) { startCommitTimer(); } @@ -1011,7 +1008,6 @@ module.exports = function( firstUncaughtError = null; capturedErrors = null; failedBoundaries = null; - didCommit = false; nestedSyncUpdates = 0; if (__DEV__) { stopWorkLoopTimer();