Skip to content

Commit

Permalink
Refactor: remove useless parameter (#25923)
Browse files Browse the repository at this point in the history
## Summary

I was reading the source code of `ReactFiberLane.js` and I found the
third parameter of the function markRootPinged was not used. So I think
we can remove it.

## How did you test this change?

There is no logic changed, so I think there is no need to add unit
tests. So I run `yarn test` and `yarn test --prod` locally and all tests
are passed.

Co-authored-by: Jan Kassens <jkassens@meta.com>
  • Loading branch information
cchaonie and kassens authored Jan 10, 2023
1 parent 1253462 commit afe6521
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions packages/react-reconciler/src/ReactFiberLane.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,11 +647,7 @@ export function markRootSuspended(root: FiberRoot, suspendedLanes: Lanes) {
}
}

export function markRootPinged(
root: FiberRoot,
pingedLanes: Lanes,
eventTime: number,
) {
export function markRootPinged(root: FiberRoot, pingedLanes: Lanes) {
root.pingedLanes |= root.suspendedLanes & pingedLanes;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberWorkLoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -3369,7 +3369,7 @@ function pingSuspendedRoot(
}

const eventTime = requestEventTime();
markRootPinged(root, pingedLanes, eventTime);
markRootPinged(root, pingedLanes);

warnIfSuspenseResolutionNotWrappedWithActDEV(root);

Expand Down

0 comments on commit afe6521

Please sign in to comment.