(name, value, propertyInfo, isCustomComponentTag)
| 963 | } |
| 964 | } |
| 965 | function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { |
| 966 | if (value === null || typeof value === 'undefined') { |
| 967 | return true; |
| 968 | } |
| 969 | |
| 970 | if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { |
| 971 | return true; |
| 972 | } |
| 973 | |
| 974 | if (isCustomComponentTag) { |
| 975 | return false; |
| 976 | } |
| 977 | |
| 978 | if (propertyInfo !== null) { |
| 979 | switch (propertyInfo.type) { |
| 980 | case BOOLEAN: |
| 981 | return !value; |
| 982 | |
| 983 | case OVERLOADED_BOOLEAN: |
| 984 | return value === false; |
| 985 | |
| 986 | case NUMERIC: |
| 987 | return isNaN(value); |
| 988 | |
| 989 | case POSITIVE_NUMERIC: |
| 990 | return isNaN(value) || value < 1; |
| 991 | } |
| 992 | } |
| 993 | |
| 994 | return false; |
| 995 | } |
| 996 | function getPropertyInfo(name) { |
| 997 | return properties.hasOwnProperty(name) ? properties[name] : null; |
| 998 | } |
no test coverage detected