Skip to content

Add support for parentId = undefined or Integer? #11

@greatestview

Description

@greatestview

First, thank you @philipstanislaus for building this nice and helpful tool!

I ran in some issues while trying to use it on a project, which I could track down to these points:

  • Items are ignored, if their parentId is undefined.
  • Items are ignored, if their parentId is 0.

Looking at the code, I saw, that you expect IDs to be strings. My project uses Integers with parentId: 0 for Root-Items. So no surprise it didn’t work out.

Would you mind:

  • adding support for Integer IDs?
  • allowing undefined (= nonexisting) and 0 (Int) as values of parentId in addition to null?

I would submit a PR, but I’m not used programming in TypeScript. :) Thank you in advance.

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