Remove unused returnFiber (#28504)
There is no use of `returnFiber` here, it can be removed.
bubucuo committed
Mar 7, 2024 at 03:02 UTC
64f354cf27a17c4e5b0dfcd908e47940cf947771
1 file changed
+2
-3
packages/react-reconciler/src/ReactChildFiber.js
+2
-3
@@ -438,7 +438,6 @@ function createChildReconciler(
438
}
439
440
function mapRemainingChildren(
441
- returnFiber: Fiber,
441
currentFirstChild: Fiber,
442
): Map<string | number, Fiber> {
443
// Add the remaining children to a temporary map so that we can find them by
@@ -1194,7 +1193,7 @@ function createChildReconciler(
1193
}
1194
1195
// Add all children to a key map for quick lookups.
1197
- const existingChildren = mapRemainingChildren(returnFiber, oldFiber);
1196
+ const existingChildren = mapRemainingChildren(oldFiber);
1197
1198
// Keep scanning and use the map to restore deleted items as moves.
1199
for (; newIdx < newChildren.length; newIdx++) {
@@ -1404,7 +1403,7 @@ function createChildReconciler(
1403
}
1404
1405
// Add all children to a key map for quick lookups.
1407
- const existingChildren = mapRemainingChildren(returnFiber, oldFiber);
1406
+ const existingChildren = mapRemainingChildren(oldFiber);
1407
1408
// Keep scanning and use the map to restore deleted items as moves.
1409
for (; !step.done; newIdx++, step = newChildren.next()) {