Skip to content

Commit a398457

Browse files
committed
Use NoLanes to replace zero for consistency
1 parent e0160d5 commit a398457

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ export function includesExpiredLane(root: FiberRoot, lanes: Lanes) {
483483
}
484484

485485
export function isTransitionLane(lane: Lane) {
486-
return (lane & TransitionLanes) !== 0;
486+
return (lane & TransitionLanes) !== NoLanes;
487487
}
488488

489489
export function claimNextTransitionLane(): Lane {
@@ -492,7 +492,7 @@ export function claimNextTransitionLane(): Lane {
492492
// run out of lanes and cycle back to the beginning.
493493
const lane = nextTransitionLane;
494494
nextTransitionLane <<= 1;
495-
if ((nextTransitionLane & TransitionLanes) === 0) {
495+
if ((nextTransitionLane & TransitionLanes) === NoLanes) {
496496
nextTransitionLane = TransitionLane1;
497497
}
498498
return lane;
@@ -501,7 +501,7 @@ export function claimNextTransitionLane(): Lane {
501501
export function claimNextRetryLane(): Lane {
502502
const lane = nextRetryLane;
503503
nextRetryLane <<= 1;
504-
if ((nextRetryLane & RetryLanes) === 0) {
504+
if ((nextRetryLane & RetryLanes) === NoLanes) {
505505
nextRetryLane = RetryLane1;
506506
}
507507
return lane;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ export function includesExpiredLane(root: FiberRoot, lanes: Lanes) {
483483
}
484484

485485
export function isTransitionLane(lane: Lane) {
486-
return (lane & TransitionLanes) !== 0;
486+
return (lane & TransitionLanes) !== NoLanes;
487487
}
488488

489489
export function claimNextTransitionLane(): Lane {
@@ -492,7 +492,7 @@ export function claimNextTransitionLane(): Lane {
492492
// run out of lanes and cycle back to the beginning.
493493
const lane = nextTransitionLane;
494494
nextTransitionLane <<= 1;
495-
if ((nextTransitionLane & TransitionLanes) === 0) {
495+
if ((nextTransitionLane & TransitionLanes) === NoLanes) {
496496
nextTransitionLane = TransitionLane1;
497497
}
498498
return lane;
@@ -501,7 +501,7 @@ export function claimNextTransitionLane(): Lane {
501501
export function claimNextRetryLane(): Lane {
502502
const lane = nextRetryLane;
503503
nextRetryLane <<= 1;
504-
if ((nextRetryLane & RetryLanes) === 0) {
504+
if ((nextRetryLane & RetryLanes) === NoLanes) {
505505
nextRetryLane = RetryLane1;
506506
}
507507
return lane;

0 commit comments

Comments
 (0)