(name, value, propertyInfo, isCustomComponentTag)
| 4225 | } |
| 4226 | |
| 4227 | function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { |
| 4228 | if (value === null || typeof value === 'undefined') { |
| 4229 | return true; |
| 4230 | } |
| 4231 | if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { |
| 4232 | return true; |
| 4233 | } |
| 4234 | if (propertyInfo !== null) { |
| 4235 | switch (propertyInfo.type) { |
| 4236 | case BOOLEAN: |
| 4237 | return !value; |
| 4238 | case OVERLOADED_BOOLEAN: |
| 4239 | return value === false; |
| 4240 | case NUMERIC: |
| 4241 | return isNaN(value); |
| 4242 | case POSITIVE_NUMERIC: |
| 4243 | return isNaN(value) || value < 1; |
| 4244 | } |
| 4245 | } |
| 4246 | return false; |
| 4247 | } |
| 4248 | |
| 4249 | function getPropertyInfo(name) { |
| 4250 | return properties.hasOwnProperty(name) ? properties[name] : null; |
no test coverage detected