Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix bug with partial path #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Kawaizombi
Copy link

Currently, when you pass paths like this

pathListToTree([
  'test/nested',
  'test'
])

where secondary path are partial of first one the result will have node with undefined name

[
  {
    "name": "test",
    "children": [
      {
        "name": "nested",
        "children": []
      },
      {
        "name": undefined, // <- THIS ONE
        "children": []
      }
    ]
  }
]

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant