Skip to content

Field - Cannot read property 'children' of undefined #37

Open
@Blm0423

Description

@Blm0423

I think this will happen even with other components, but it is Field (line 70) that I tried to use now. Error occurs by just having the component on the page.
The error stopped the svelte-router from working properly!

Uncaught (in promise) TypeError: Cannot read property 'children' of undefined

  $: {
    if (grouped) fieldType = 'is-grouped'
    else if (mounted) {
      const childNodes = Array.prototype.filter.call(**el.children**, c => !([labelEl, messageEl].includes(c)))
      if (childNodes.length > 1 && addons) {
        fieldType = 'has-addons'
      }
    }
  }

Example project: https://github.com/Blm0423/svelma-router-problem.git

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions