(name, value, propertyInfo, isCustomComponentTag)
| 3448 | } |
| 3449 | |
| 3450 | function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { |
| 3451 | if (value === null || typeof value === 'undefined') { |
| 3452 | return true; |
| 3453 | } |
| 3454 | if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { |
| 3455 | return true; |
| 3456 | } |
| 3457 | if (propertyInfo !== null) { |
| 3458 | switch (propertyInfo.type) { |
| 3459 | case BOOLEAN: |
| 3460 | return !value; |
| 3461 | case OVERLOADED_BOOLEAN: |
| 3462 | return value === false; |
| 3463 | case NUMERIC: |
| 3464 | return isNaN(value); |
| 3465 | case POSITIVE_NUMERIC: |
| 3466 | return isNaN(value) || value < 1; |
| 3467 | } |
| 3468 | } |
| 3469 | return false; |
| 3470 | } |
| 3471 | |
| 3472 | function getPropertyInfo(name) { |
| 3473 | return properties.hasOwnProperty(name) ? properties[name] : null; |
no test coverage detected