(name, value, propertyInfo, isCustomComponentTag)
| 4180 | } |
| 4181 | |
| 4182 | function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { |
| 4183 | if (value === null || typeof value === 'undefined') { |
| 4184 | return true; |
| 4185 | } |
| 4186 | if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { |
| 4187 | return true; |
| 4188 | } |
| 4189 | if (propertyInfo !== null) { |
| 4190 | switch (propertyInfo.type) { |
| 4191 | case BOOLEAN: |
| 4192 | return !value; |
| 4193 | case OVERLOADED_BOOLEAN: |
| 4194 | return value === false; |
| 4195 | case NUMERIC: |
| 4196 | return isNaN(value); |
| 4197 | case POSITIVE_NUMERIC: |
| 4198 | return isNaN(value) || value < 1; |
| 4199 | } |
| 4200 | } |
| 4201 | return false; |
| 4202 | } |
| 4203 | |
| 4204 | function getPropertyInfo(name) { |
| 4205 | return properties.hasOwnProperty(name) ? properties[name] : null; |
no test coverage detected