(type, props, canUseEventSystem)
| 5711 | } |
| 5712 | |
| 5713 | var warnUnknownProperties = function (type, props, canUseEventSystem) { |
| 5714 | { |
| 5715 | var unknownProps = []; |
| 5716 | |
| 5717 | for (var key in props) { |
| 5718 | var isValid = validateProperty$1(type, key, props[key], canUseEventSystem); |
| 5719 | |
| 5720 | if (!isValid) { |
| 5721 | unknownProps.push(key); |
| 5722 | } |
| 5723 | } |
| 5724 | |
| 5725 | var unknownPropString = unknownProps.map(function (prop) { |
| 5726 | return '`' + prop + '`'; |
| 5727 | }).join(', '); |
| 5728 | |
| 5729 | if (unknownProps.length === 1) { |
| 5730 | error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type); |
| 5731 | } else if (unknownProps.length > 1) { |
| 5732 | error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type); |
| 5733 | } |
| 5734 | } |
| 5735 | }; |
| 5736 | |
| 5737 | function validateProperties$2(type, props, canUseEventSystem) { |
| 5738 | if (isCustomComponent(type, props)) { |
no test coverage detected