Skip to content

Commit

Permalink
Remove incorrect priority check
Browse files Browse the repository at this point in the history
I think this was just poor factoring on my part in #18411. Honestly it
doesn't make much sense to me, but my best guess is that I must have
thought that when `baseTime > currentChildExpirationTime`, the function
would fall through to the
`currentChildExpirationTime < renderExpirationTime` branch below.

Really I think just made an oopsie.

Regardless, this logic is galaxy brainéd. A goal of the Lanes refactor
I'm working on is to make these types of checks -- is there remaining
work in this tree? -- a lot easier to think about. Hopefully.
  • Loading branch information
acdlite committed Apr 17, 2020
1 parent b7a0583 commit c673395
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions packages/react-reconciler/src/ReactFiberBeginWork.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -1681,11 +1681,7 @@ function getRemainingWorkInPrimaryTree(
// This boundary already timed out. Check if this render includes the level
// that previously suspended.
const baseTime = currentSuspenseState.baseTime;
if (
baseTime !== NoWork &&
baseTime < renderExpirationTime &&
baseTime > currentChildExpirationTime
) {
if (baseTime !== NoWork && baseTime < renderExpirationTime) {
// There's pending work at a lower level that might now be unblocked.
return baseTime;
}
Expand Down
6 changes: 1 addition & 5 deletions packages/react-reconciler/src/ReactFiberBeginWork.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -1681,11 +1681,7 @@ function getRemainingWorkInPrimaryTree(
// This boundary already timed out. Check if this render includes the level
// that previously suspended.
const baseTime = currentSuspenseState.baseTime;
if (
baseTime !== NoWork &&
baseTime < renderExpirationTime &&
baseTime > currentChildExpirationTime
) {
if (baseTime !== NoWork && baseTime < renderExpirationTime) {
// There's pending work at a lower level that might now be unblocked.
return baseTime;
}
Expand Down

0 comments on commit c673395

Please sign in to comment.