(name, value, propertyInfo, isCustomComponentTag)
| 4640 | } |
| 4641 | } |
| 4642 | function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { |
| 4643 | if (value === null || typeof value === 'undefined') { |
| 4644 | return true; |
| 4645 | } |
| 4646 | |
| 4647 | if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { |
| 4648 | return true; |
| 4649 | } |
| 4650 | |
| 4651 | if (isCustomComponentTag) { |
| 4652 | return false; |
| 4653 | } |
| 4654 | |
| 4655 | if (propertyInfo !== null) { |
| 4656 | switch (propertyInfo.type) { |
| 4657 | case BOOLEAN: |
| 4658 | return !value; |
| 4659 | |
| 4660 | case OVERLOADED_BOOLEAN: |
| 4661 | return value === false; |
| 4662 | |
| 4663 | case NUMERIC: |
| 4664 | return isNaN(value); |
| 4665 | |
| 4666 | case POSITIVE_NUMERIC: |
| 4667 | return isNaN(value) || value < 1; |
| 4668 | } |
| 4669 | } |
| 4670 | |
| 4671 | return false; |
| 4672 | } |
| 4673 | function getPropertyInfo(name) { |
| 4674 | return properties.hasOwnProperty(name) ? properties[name] : null; |
| 4675 | } |
no test coverage detected