Skip to content

Commit ce2e0ad

Browse files
bubucuoAndyPengc12
authored andcommitted
Remove unused returnFiber (facebook#28504)
There is no use of `returnFiber` here, it can be removed.
1 parent 819d95e commit ce2e0ad

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/react-reconciler/src/ReactChildFiber.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,6 @@ function createChildReconciler(
438438
}
439439

440440
function mapRemainingChildren(
441-
returnFiber: Fiber,
442441
currentFirstChild: Fiber,
443442
): Map<string | number, Fiber> {
444443
// Add the remaining children to a temporary map so that we can find them by
@@ -1194,7 +1193,7 @@ function createChildReconciler(
11941193
}
11951194

11961195
// Add all children to a key map for quick lookups.
1197-
const existingChildren = mapRemainingChildren(returnFiber, oldFiber);
1196+
const existingChildren = mapRemainingChildren(oldFiber);
11981197

11991198
// Keep scanning and use the map to restore deleted items as moves.
12001199
for (; newIdx < newChildren.length; newIdx++) {
@@ -1404,7 +1403,7 @@ function createChildReconciler(
14041403
}
14051404

14061405
// Add all children to a key map for quick lookups.
1407-
const existingChildren = mapRemainingChildren(returnFiber, oldFiber);
1406+
const existingChildren = mapRemainingChildren(oldFiber);
14081407

14091408
// Keep scanning and use the map to restore deleted items as moves.
14101409
for (; !step.done; newIdx++, step = newChildren.next()) {

0 commit comments

Comments
 (0)