Skip to content

TypeError: nodes[0] is undefined - custom priority parameter #79

@Mihailoff

Description

@Mihailoff

I'm using a custom priority parameter and getting the following error TypeError: nodes[0] is undefined

nextYStart = nodes[0].to.filter(to => to.node.x > x + 1).reduce((acc, cur) => acc + cur.flow, 0) || 0;

nodes[0] assumes that there is always at least one element and this is not true in my case.

[email protected]
[email protected]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions