()
| 13552 | } |
| 13553 | |
| 13554 | function warnOnFunctionType() { |
| 13555 | { |
| 13556 | var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + getCurrentFiberStackInDev(); |
| 13557 | |
| 13558 | if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) { |
| 13559 | return; |
| 13560 | } |
| 13561 | |
| 13562 | ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true; |
| 13563 | |
| 13564 | error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.'); |
| 13565 | } |
| 13566 | } // This wrapper function exists because I expect to clone the code in each path |
| 13567 | // to be able to optimize each path individually by branching early. This needs |
| 13568 | // a compiler or we can do it manually. Helpers that don't need this branching |
| 13569 | // live outside of this function. |
no test coverage detected