From 60e63b960f19d4c846cf32d47d2a974297ae253a Mon Sep 17 00:00:00 2001 From: Luna Ruan Date: Fri, 8 Apr 2022 17:33:52 -0500 Subject: [PATCH] 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 --- packages/react-reconciler/src/ReactFiberLane.new.js | 7 ------- packages/react-reconciler/src/ReactFiberLane.old.js | 7 ------- 2 files changed, 14 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberLane.new.js b/packages/react-reconciler/src/ReactFiberLane.new.js index 4a8344d19e1e6..8290c75e882ec 100644 --- a/packages/react-reconciler/src/ReactFiberLane.new.js +++ b/packages/react-reconciler/src/ReactFiberLane.new.js @@ -859,13 +859,6 @@ export function clearTransitionsForLanes(root: FiberRoot, lanes: Lane | Lanes) { const transitions = root.transitionLanes[index]; if (transitions !== null) { root.transitionLanes[index] = null; - } else { - if (__DEV__) { - console.error( - 'React Bug: transition lanes accessed out of bounds index: %s', - index.toString(), - ); - } } lanes &= ~lane; diff --git a/packages/react-reconciler/src/ReactFiberLane.old.js b/packages/react-reconciler/src/ReactFiberLane.old.js index 280fbefe688a8..1725183736384 100644 --- a/packages/react-reconciler/src/ReactFiberLane.old.js +++ b/packages/react-reconciler/src/ReactFiberLane.old.js @@ -859,13 +859,6 @@ export function clearTransitionsForLanes(root: FiberRoot, lanes: Lane | Lanes) { const transitions = root.transitionLanes[index]; if (transitions !== null) { root.transitionLanes[index] = null; - } else { - if (__DEV__) { - console.error( - 'React Bug: transition lanes accessed out of bounds index: %s', - index.toString(), - ); - } } lanes &= ~lane;