Skip to content

Commit c673395

Browse files
committed
Remove incorrect priority check
I think this was just poor factoring on my part in facebook#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.
1 parent b7a0583 commit c673395

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

packages/react-reconciler/src/ReactFiberBeginWork.new.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -1681,11 +1681,7 @@ function getRemainingWorkInPrimaryTree(
16811681
// This boundary already timed out. Check if this render includes the level
16821682
// that previously suspended.
16831683
const baseTime = currentSuspenseState.baseTime;
1684-
if (
1685-
baseTime !== NoWork &&
1686-
baseTime < renderExpirationTime &&
1687-
baseTime > currentChildExpirationTime
1688-
) {
1684+
if (baseTime !== NoWork && baseTime < renderExpirationTime) {
16891685
// There's pending work at a lower level that might now be unblocked.
16901686
return baseTime;
16911687
}

packages/react-reconciler/src/ReactFiberBeginWork.old.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -1681,11 +1681,7 @@ function getRemainingWorkInPrimaryTree(
16811681
// This boundary already timed out. Check if this render includes the level
16821682
// that previously suspended.
16831683
const baseTime = currentSuspenseState.baseTime;
1684-
if (
1685-
baseTime !== NoWork &&
1686-
baseTime < renderExpirationTime &&
1687-
baseTime > currentChildExpirationTime
1688-
) {
1684+
if (baseTime !== NoWork && baseTime < renderExpirationTime) {
16891685
// There's pending work at a lower level that might now be unblocked.
16901686
return baseTime;
16911687
}

0 commit comments

Comments
 (0)