(name, value, propertyInfo, isCustomComponentTag)
| 4060 | } |
| 4061 | |
| 4062 | function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { |
| 4063 | if (propertyInfo !== null && propertyInfo.type === RESERVED) { |
| 4064 | return false; |
| 4065 | } |
| 4066 | switch (typeof value) { |
| 4067 | case 'function': |
| 4068 | // $FlowIssue symbol is perfectly valid here |
| 4069 | case 'symbol': |
| 4070 | // eslint-disable-line |
| 4071 | return true; |
| 4072 | case 'boolean': |
| 4073 | { |
| 4074 | if (isCustomComponentTag) { |
| 4075 | return false; |
| 4076 | } |
| 4077 | if (propertyInfo !== null) { |
| 4078 | return !propertyInfo.acceptsBooleans; |
| 4079 | } else { |
| 4080 | var prefix = name.toLowerCase().slice(0, 5); |
| 4081 | return prefix !== 'data-' && prefix !== 'aria-'; |
| 4082 | } |
| 4083 | } |
| 4084 | default: |
| 4085 | return false; |
| 4086 | } |
| 4087 | } |
| 4088 | |
| 4089 | function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { |
| 4090 | if (value === null || typeof value === 'undefined') { |
no outgoing calls
no test coverage detected