(name, value, propertyInfo, isCustomComponentTag)
| 4338 | } |
| 4339 | |
| 4340 | function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { |
| 4341 | if (value === null || typeof value === 'undefined') { |
| 4342 | return true; |
| 4343 | } |
| 4344 | if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { |
| 4345 | return true; |
| 4346 | } |
| 4347 | if (propertyInfo !== null) { |
| 4348 | switch (propertyInfo.type) { |
| 4349 | case BOOLEAN: |
| 4350 | return !value; |
| 4351 | case OVERLOADED_BOOLEAN: |
| 4352 | return value === false; |
| 4353 | case NUMERIC: |
| 4354 | return isNaN(value); |
| 4355 | case POSITIVE_NUMERIC: |
| 4356 | return isNaN(value) || value < 1; |
| 4357 | } |
| 4358 | } |
| 4359 | return false; |
| 4360 | } |
| 4361 | |
| 4362 | function getPropertyInfo(name) { |
| 4363 | return properties.hasOwnProperty(name) ? properties[name] : null; |
no test coverage detected