Skip to content

Commit

Permalink
Remove redundant expiration time comparisons
Browse files Browse the repository at this point in the history
I'm going through all the expiration times comparisons as part of my
refactor and I noticed this one has a redundancy.
  • Loading branch information
acdlite committed Apr 15, 2020
1 parent e5cebf9 commit 4cb78e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions packages/react-reconciler/src/ReactFiberBeginWork.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -3173,10 +3173,8 @@ function beginWork(
const childChildExpirationTime =
primaryChild.childExpirationTime;
if (
(childUpdateExpirationTime !== NoWork &&
childUpdateExpirationTime >= renderExpirationTime) ||
(childChildExpirationTime !== NoWork &&
childChildExpirationTime >= renderExpirationTime)
childUpdateExpirationTime >= renderExpirationTime ||
childChildExpirationTime >= renderExpirationTime
) {
// Found a child with an update with sufficient priority.
// Use the normal path to render the primary children again.
Expand Down
6 changes: 2 additions & 4 deletions packages/react-reconciler/src/ReactFiberBeginWork.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -3173,10 +3173,8 @@ function beginWork(
const childChildExpirationTime =
primaryChild.childExpirationTime;
if (
(childUpdateExpirationTime !== NoWork &&
childUpdateExpirationTime >= renderExpirationTime) ||
(childChildExpirationTime !== NoWork &&
childChildExpirationTime >= renderExpirationTime)
childUpdateExpirationTime >= renderExpirationTime ||
childChildExpirationTime >= renderExpirationTime
) {
// Found a child with an update with sufficient priority.
// Use the normal path to render the primary children again.
Expand Down

0 comments on commit 4cb78e5

Please sign in to comment.