Changeset 0c6b92a for imaps-frontend/node_modules/eslint-plugin-react/lib/rules/void-dom-elements-no-children.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/eslint-plugin-react/lib/rules/void-dom-elements-no-children.js
rd565449 r0c6b92a 48 48 const noChildrenInVoidEl = 'Void DOM element <{{element}} /> cannot receive children.'; 49 49 50 /** @type {import('eslint').Rule.RuleModule} */ 50 51 module.exports = { 51 52 meta: { … … 120 121 } 121 122 122 const elementName = args[0].value;123 const elementName = 'value' in args[0] ? args[0].value : undefined; 123 124 124 125 if (!isVoidDOMElement(elementName)) { … … 145 146 146 147 const hasChildrenPropOrDanger = props.some((prop) => { 147 if (! prop.key) {148 if (!('key' in prop) || !prop.key || !('name' in prop.key)) { 148 149 return false; 149 150 }
Note:
See TracChangeset
for help on using the changeset viewer.