* Ensure that every element either is passed in a static location, in an * array with an explicit keys property defined, or in an object literal * with valid key property. * * @internal * @param {ReactNode} node Statically passed child of any type. * @param {*} parentType node's parent's type.
(node)
| 797 | * @param {*} parentType node's parent's type. |
| 798 | */ |
| 799 | function validateChildKeys(node) { |
| 800 | if (__DEV__) { |
| 801 | // Mark elements as being in a valid static child position so they |
| 802 | // don't need keys. |
| 803 | if (isValidElement(node)) { |
| 804 | if (node._store) { |
| 805 | node._store.validated = 1; |
| 806 | } |
| 807 | } else if (isLazyType(node)) { |
| 808 | if (node._payload.status === 'fulfilled') { |
| 809 | if (isValidElement(node._payload.value) && node._payload.value._store) { |
| 810 | node._payload.value._store.validated = 1; |
| 811 | } |
| 812 | } else if (node._store) { |
| 813 | node._store.validated = 1; |
| 814 | } |
| 815 | } |
| 816 | } |
| 817 | } |
| 818 | |
| 819 | /** |
| 820 | * Verifies the object is a ReactElement. |
no test coverage detected