Skip to content

Commit

Permalink
remove console.error in ReactFiberLane (#24319)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lunaruan authored and rickhanlonii committed Apr 13, 2022
1 parent 2bbd282 commit e36630a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
7 changes: 0 additions & 7 deletions packages/react-reconciler/src/ReactFiberLane.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 0 additions & 7 deletions packages/react-reconciler/src/ReactFiberLane.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e36630a

Please sign in to comment.