(props, propName, componentName, location, propFullName)
| 1439 | } |
| 1440 | |
| 1441 | function validate(props, propName, componentName, location, propFullName) { |
| 1442 | var propValue = props[propName]; |
| 1443 | var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue); |
| 1444 | |
| 1445 | if (_react2.default.isValidElement(propValue)) { |
| 1446 | return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement. You can usually obtain a ReactComponent or DOMElement ' + 'from a ReactElement by attaching a ref to it.'); |
| 1447 | } |
| 1448 | |
| 1449 | if ((propType !== 'object' || typeof propValue.render !== 'function') && propValue.nodeType !== 1) { |
| 1450 | return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement.'); |
| 1451 | } |
| 1452 | |
| 1453 | return null; |
| 1454 | } |
| 1455 | |
| 1456 | exports.default = (0, _createChainableTypeChecker2.default)(validate); |
| 1457 | module.exports = exports['default']; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…