(name, value, propertyInfo, isCustomComponentTag)
| 3417 | } |
| 3418 | |
| 3419 | function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { |
| 3420 | if (value === null || typeof value === 'undefined') { |
| 3421 | return true; |
| 3422 | } |
| 3423 | if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { |
| 3424 | return true; |
| 3425 | } |
| 3426 | if (propertyInfo !== null) { |
| 3427 | switch (propertyInfo.type) { |
| 3428 | case BOOLEAN: |
| 3429 | return !value; |
| 3430 | case OVERLOADED_BOOLEAN: |
| 3431 | return value === false; |
| 3432 | case NUMERIC: |
| 3433 | return isNaN(value); |
| 3434 | case POSITIVE_NUMERIC: |
| 3435 | return isNaN(value) || value < 1; |
| 3436 | } |
| 3437 | } |
| 3438 | return false; |
| 3439 | } |
| 3440 | |
| 3441 | function getPropertyInfo(name) { |
| 3442 | return properties.hasOwnProperty(name) ? properties[name] : null; |
no test coverage detected