Skip to content

[Bug] config items with children must have an empty children: [] or the promise errors #21

@andrewmosby

Description

@andrewmosby

Currently an entry in the config file with the following structure will cause an error (and the page will not load). Note that this is the pattern set in the README.

{
  "title": "Buttons",
  "children": [
    {
      "title": "Primary Button",
      "url": "button-primary"
    },
    {
      "title": "Secondary Button",
      "url": "button-secondary"
    }
  ]
}

This is the error produced in the console: Uncaught (in promise) TypeError: e.item.children is undefined

Currently, the workaround is to add an empty children: [] line.

{
  "title": "Buttons",
  "children": [
    {
      "title": "Primary Button",
      "url": "button-primary",
      "children": []
    },
    {
      "title": "Secondary Button",
      "url": "button-secondary",
      "children": []
    }
  ]
}

Suggested action

  • Confirm bug
  • Update README w/ current preferred structure (if creating a fix is not quick)
  • Create a fix so children: [] is not needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions