mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
Get rid of DEV only invariant
This commit is contained in:
@@ -806,15 +806,13 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
|
||||
// First, validate keys.
|
||||
// We'll get a different iterator later for the main pass.
|
||||
const newChildren = iteratorFn.call(newChildrenIterable);
|
||||
invariant(
|
||||
newChildren != null,
|
||||
'An iterable object provided no iterator.'
|
||||
);
|
||||
let knownKeys = null;
|
||||
let step = newChildren.next();
|
||||
for (; !step.done; step = newChildren.next()) {
|
||||
const child = step.value;
|
||||
knownKeys = warnOnDuplicateKey(child, knownKeys);
|
||||
if (newChildren) {
|
||||
let knownKeys = null;
|
||||
let step = newChildren.next();
|
||||
for (; !step.done; step = newChildren.next()) {
|
||||
const child = step.value;
|
||||
knownKeys = warnOnDuplicateKey(child, knownKeys);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user