Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Graph crashes when no links or nodes are provided #559

Open
JohannesWt opened this issue Nov 9, 2024 · 1 comment · May be fixed by #560
Open

Graph crashes when no links or nodes are provided #559

JohannesWt opened this issue Nov 9, 2024 · 1 comment · May be fixed by #560
Labels

Comments

@JohannesWt
Copy link

Describe the bug
If no links or nodes are provided the error which is shown below in the screenshots is thrown.
In version 9.0.1, at least one node and one link are required. However, as we use the graph to establish relationships between nodes, providing initial links isn’t feasible, leading to an endless loop that crashes the Angular app. It would be helpful if the case of empty links or nodes were handled as it was prior to the 9.0.0 release.

To Reproduce
Steps to reproduce the behavior:

  1. Create a graph (e.g. a simple demo graph from the documentation) and provide an empty array of nodes and links
  2. Open the graph
  3. see the error above

Expected behavior
Even if an empty array of links and nodes (or only 1 node) are provided the graph should still render.

Screenshots
If applicable, add screenshots to help explain your problem.
image
image

ngx-graph version
9.0.1

@JohannesWt JohannesWt added the bug label Nov 9, 2024
@JohannesWt JohannesWt changed the title Graph fails when no links or nodes are provided Graph crashes when no links or nodes are provided Nov 9, 2024
@krusche
Copy link

krusche commented Dec 7, 2024

@steveblue we provided a fix in #560 can we merge it?

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

Successfully merging a pull request may close this issue.

2 participants