mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Don't reorder a single child
This commit is contained in:
@@ -937,6 +937,10 @@ export function attach(
|
||||
}
|
||||
|
||||
const numChildren = nextChildren.length;
|
||||
if (numChildren === 1) {
|
||||
// No need to reorder a single child.
|
||||
return;
|
||||
}
|
||||
beginNextOperation(3 + numChildren);
|
||||
nextOperation[0] = TREE_OPERATION_REORDER_CHILDREN;
|
||||
nextOperation[1] = getFiberID(getPrimaryFiber(fiber));
|
||||
|
||||
Reference in New Issue
Block a user