remove console.error in ReactFiberLane (#24319)
We changed the implementation of root.transitionLanes so that, if there is no transitions for a given lane, we use null instead of an array. This means that this error is no longer valid, so we are removing it
Luna Ruan committed
Apr 8, 2022 at 17:33 UTC
60e63b960f19d4c846cf32d47d2a974297ae253a
2 files changed
-14
packages/react-reconciler/src/ReactFiberLane.new.js
-7
@@ -859,13 +859,6 @@ export function clearTransitionsForLanes(root: FiberRoot, lanes: Lane | Lanes) {
859
const transitions = root.transitionLanes[index];
860
if (transitions !== null) {
861
root.transitionLanes[index] = null;
862
- } else {
863
- if (__DEV__) {
864
- console.error(
865
- 'React Bug: transition lanes accessed out of bounds index: %s',
866
- index.toString(),
867
- );
868
- }
862
}
863
864
lanes &= ~lane;
packages/react-reconciler/src/ReactFiberLane.old.js
-7
@@ -859,13 +859,6 @@ export function clearTransitionsForLanes(root: FiberRoot, lanes: Lane | Lanes) {
859
const transitions = root.transitionLanes[index];
860
if (transitions !== null) {
861
root.transitionLanes[index] = null;
862
- } else {
863
- if (__DEV__) {
864
- console.error(
865
- 'React Bug: transition lanes accessed out of bounds index: %s',
866
- index.toString(),
867
- );
868
- }
862
}
863
864
lanes &= ~lane;