From a3984577898f5479946cb89e6faf411e565da90b Mon Sep 17 00:00:00 2001 From: wtlin1228 Date: Sun, 10 Apr 2022 00:55:52 +0800 Subject: [PATCH] Use NoLanes to replace zero for consistency --- packages/react-reconciler/src/ReactFiberLane.new.js | 6 +++--- packages/react-reconciler/src/ReactFiberLane.old.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberLane.new.js b/packages/react-reconciler/src/ReactFiberLane.new.js index 8290c75e882ec..446c896ba8fba 100644 --- a/packages/react-reconciler/src/ReactFiberLane.new.js +++ b/packages/react-reconciler/src/ReactFiberLane.new.js @@ -483,7 +483,7 @@ export function includesExpiredLane(root: FiberRoot, lanes: Lanes) { } export function isTransitionLane(lane: Lane) { - return (lane & TransitionLanes) !== 0; + return (lane & TransitionLanes) !== NoLanes; } export function claimNextTransitionLane(): Lane { @@ -492,7 +492,7 @@ export function claimNextTransitionLane(): Lane { // run out of lanes and cycle back to the beginning. const lane = nextTransitionLane; nextTransitionLane <<= 1; - if ((nextTransitionLane & TransitionLanes) === 0) { + if ((nextTransitionLane & TransitionLanes) === NoLanes) { nextTransitionLane = TransitionLane1; } return lane; @@ -501,7 +501,7 @@ export function claimNextTransitionLane(): Lane { export function claimNextRetryLane(): Lane { const lane = nextRetryLane; nextRetryLane <<= 1; - if ((nextRetryLane & RetryLanes) === 0) { + if ((nextRetryLane & RetryLanes) === NoLanes) { nextRetryLane = RetryLane1; } return lane; diff --git a/packages/react-reconciler/src/ReactFiberLane.old.js b/packages/react-reconciler/src/ReactFiberLane.old.js index 1725183736384..74f5f01852f28 100644 --- a/packages/react-reconciler/src/ReactFiberLane.old.js +++ b/packages/react-reconciler/src/ReactFiberLane.old.js @@ -483,7 +483,7 @@ export function includesExpiredLane(root: FiberRoot, lanes: Lanes) { } export function isTransitionLane(lane: Lane) { - return (lane & TransitionLanes) !== 0; + return (lane & TransitionLanes) !== NoLanes; } export function claimNextTransitionLane(): Lane { @@ -492,7 +492,7 @@ export function claimNextTransitionLane(): Lane { // run out of lanes and cycle back to the beginning. const lane = nextTransitionLane; nextTransitionLane <<= 1; - if ((nextTransitionLane & TransitionLanes) === 0) { + if ((nextTransitionLane & TransitionLanes) === NoLanes) { nextTransitionLane = TransitionLane1; } return lane; @@ -501,7 +501,7 @@ export function claimNextTransitionLane(): Lane { export function claimNextRetryLane(): Lane { const lane = nextRetryLane; nextRetryLane <<= 1; - if ((nextRetryLane & RetryLanes) === 0) { + if ((nextRetryLane & RetryLanes) === NoLanes) { nextRetryLane = RetryLane1; } return lane;