(returnFiber, workInProgress, child, knownKeys)
| 23596 | return null; |
| 23597 | } |
| 23598 | function warnOnInvalidKey(returnFiber, workInProgress, child, knownKeys) { |
| 23599 | if ("object" !== typeof child || null === child) return knownKeys; |
| 23600 | switch (child.$$typeof) { |
| 23601 | case REACT_ELEMENT_TYPE: |
| 23602 | case REACT_PORTAL_TYPE: |
| 23603 | warnForMissingKey(returnFiber, workInProgress, child); |
| 23604 | var key = child.key; |
| 23605 | if ("string" !== typeof key) break; |
| 23606 | if (null === knownKeys) { |
| 23607 | knownKeys = new Set(); |
| 23608 | knownKeys.add(key); |
| 23609 | break; |
| 23610 | } |
| 23611 | if (!knownKeys.has(key)) { |
| 23612 | knownKeys.add(key); |
| 23613 | break; |
| 23614 | } |
| 23615 | runWithFiberInDEV(workInProgress, function () { |
| 23616 | console.error( |
| 23617 | "Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \u2014 the behavior is unsupported and could change in a future version.", |
| 23618 | key |
| 23619 | ); |
| 23620 | }); |
| 23621 | break; |
| 23622 | case REACT_LAZY_TYPE: |
| 23623 | (child = callLazyInitInDEV(child)), |
| 23624 | warnOnInvalidKey(returnFiber, workInProgress, child, knownKeys); |
| 23625 | } |
| 23626 | return knownKeys; |
| 23627 | } |
| 23628 | function reconcileChildrenArray( |
| 23629 | returnFiber, |
| 23630 | currentFirstChild, |
no test coverage detected
searching dependent graphs…