(children)
| 2186 | var didWarnInvalidChild = false; |
| 2187 | |
| 2188 | function flattenChildren(children) { |
| 2189 | var content = ''; // Flatten children. We'll warn if they are invalid |
| 2190 | // during validateProps() which runs for hydration too. |
| 2191 | // Note that this would throw on non-element objects. |
| 2192 | // Elements are stringified (which is normally irrelevant |
| 2193 | // but matters for <fbt>). |
| 2194 | |
| 2195 | React.Children.forEach(children, function (child) { |
| 2196 | if (child == null) { |
| 2197 | return; |
| 2198 | } |
| 2199 | |
| 2200 | content += child; // Note: we don't warn about invalid children here. |
| 2201 | // Instead, this is done separately below so that |
| 2202 | // it happens during the hydration codepath too. |
| 2203 | }); |
| 2204 | return content; |
| 2205 | } |
| 2206 | /** |
| 2207 | * Implements an <option> host component that warns when `selected` is set. |
| 2208 | */ |
no test coverage detected