(name, value, propertyInfo, isCustomComponentTag)
| 4122 | } |
| 4123 | |
| 4124 | function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { |
| 4125 | if (value === null || typeof value === 'undefined') { |
| 4126 | return true; |
| 4127 | } |
| 4128 | if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { |
| 4129 | return true; |
| 4130 | } |
| 4131 | if (propertyInfo !== null) { |
| 4132 | switch (propertyInfo.type) { |
| 4133 | case BOOLEAN: |
| 4134 | return !value; |
| 4135 | case OVERLOADED_BOOLEAN: |
| 4136 | return value === false; |
| 4137 | case NUMERIC: |
| 4138 | return isNaN(value); |
| 4139 | case POSITIVE_NUMERIC: |
| 4140 | return isNaN(value) || value < 1; |
| 4141 | } |
| 4142 | } |
| 4143 | return false; |
| 4144 | } |
| 4145 | |
| 4146 | function getPropertyInfo(name) { |
| 4147 | return properties.hasOwnProperty(name) ? properties[name] : null; |
no test coverage detected