| 14556 | var didWarnSelectedSetOnOption = false; |
| 14557 | |
| 14558 | function flattenChildren(children) { |
| 14559 | var content = ''; |
| 14560 | |
| 14561 | // Flatten children and warn if they aren't strings or numbers; |
| 14562 | // invalid types are ignored. |
| 14563 | // We can silently skip them because invalid DOM nesting warning |
| 14564 | // catches these cases in Fiber. |
| 14565 | React.Children.forEach(children, function (child) { |
| 14566 | if (child == null) { |
| 14567 | return; |
| 14568 | } |
| 14569 | if (typeof child === 'string' || typeof child === 'number') { |
| 14570 | content += child; |
| 14571 | } |
| 14572 | }); |
| 14573 | |
| 14574 | return content; |
| 14575 | } |
| 14576 | |
| 14577 | /** |
| 14578 | * Implements an <option> host component that warns when `selected` is set. |