Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/eslint-plugin-react/lib/rules/void-dom-elements-no-children.js

    rd565449 r0c6b92a  
    4848const noChildrenInVoidEl = 'Void DOM element <{{element}} /> cannot receive children.';
    4949
     50/** @type {import('eslint').Rule.RuleModule} */
    5051module.exports = {
    5152  meta: {
     
    120121      }
    121122
    122       const elementName = args[0].value;
     123      const elementName = 'value' in args[0] ? args[0].value : undefined;
    123124
    124125      if (!isVoidDOMElement(elementName)) {
     
    145146
    146147      const hasChildrenPropOrDanger = props.some((prop) => {
    147         if (!prop.key) {
     148        if (!('key' in prop) || !prop.key || !('name' in prop.key)) {
    148149          return false;
    149150        }
Note: See TracChangeset for help on using the changeset viewer.