Don't reset the return fiber after cloning the child fibers, as we already do that while cloning.
This commit is contained in:
parent
12ad77d006
commit
f939c1bca4
|
@ -1353,15 +1353,15 @@ exports.cloneChildFibers = function(current : Fiber | null, workInProgress : Fib
|
||||||
newChild.return = workInProgress;
|
newChild.return = workInProgress;
|
||||||
}
|
}
|
||||||
newChild.sibling = null;
|
newChild.sibling = null;
|
||||||
}
|
} else {
|
||||||
|
// If there is no alternate, then we don't need to clone the children.
|
||||||
// If there is no alternate, then we don't need to clone the children.
|
// If the children of the alternate fiber is a different set, then we don't
|
||||||
// If the children of the alternate fiber is a different set, then we don't
|
// need to clone. We need to reset the return fiber though since we'll
|
||||||
// need to clone. We need to reset the return fiber though since we'll
|
// traverse down into them.
|
||||||
// traverse down into them.
|
let child = workInProgress.child;
|
||||||
let child = workInProgress.child;
|
while (child !== null) {
|
||||||
while (child !== null) {
|
child.return = workInProgress;
|
||||||
child.return = workInProgress;
|
child = child.sibling;
|
||||||
child = child.sibling;
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue