Skip to content

Commit

Permalink
check if the render scheduled higher pri work
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Aug 7, 2019
1 parent 8f43a85 commit c9c6c0a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/react-reconciler/src/ReactFiberWorkLoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,12 @@ function workLoopSync() {

function workLoop() {
// Perform work until Scheduler asks us to yield
while (workInProgress !== null && !shouldYield()) {
while (
workInProgress !== null &&
!shouldYield() &&
workInProgressRoot !== null &&
renderExpirationTime >= workInProgressRoot.firstPendingTime
) {
workInProgress = performUnitOfWork(workInProgress);
}
}
Expand Down

0 comments on commit c9c6c0a

Please sign in to comment.