You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Deleting node is sandbox breaks the demo if the number of nodes reaches 0. The error message in the console is descriptive but the app crashes and the page needs to be refreshed.
Hi @pushpinder107, thank you so much for looking into this. We were aware of this before thus the custom error. Anyways I think we can do better if you're willing to submit a PR I would suggest adding an error boundary here as you suggested:
When we reach the point where we only have 1 node, do not delete any more nodes when the user clicks on the - button, and keep logging the error with the same message, but maybe instead of using console.warn so that it's less noisy and alarming.
Describe the bug
Deleting node is sandbox breaks the demo if the number of nodes reaches 0. The error message in the console is descriptive but the app crashes and the page needs to be refreshed.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Either stop deleting nodes when the count has reached 0 or wrap the graph in an error boundary to stop the app from crashing.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
I can give a PR to fix it, would you rather add an error boundary or stop node deletion when only one is left?
The text was updated successfully, but these errors were encountered: