-
Notifications
You must be signed in to change notification settings - Fork 231
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
Not passing data.links breaks the library while it should throw a custom error #211
Comments
@LonelyPrincess what do you think it would be the most appropriate message in this case? Do you think the example I provided is clear enough? |
You're right, it would be good to trigger a custom message to make things clear to the developer in this case. The message you provide suggests that they may have forgotten to include the
There's something else we may need to consider, though. 🤔 Since passing an empty links array is supported, then providing at least a link is not mandatory. I doubt many people would use this library to display isolate nodes without any links, but since the user is free not to pass any link at all, we could set the That would prevent this error from happening in the first place, although it would be still a good idea to show a warning to the developer indicating they are missing the links property in case they didn't do it on purpose. |
Fixed with #246 |
I like this idea @LonelyPrincess, the change it's not big, but it would handle this in a more graceful manner. Feel free to take over on this one. |
Describe the bug
A detailed stack can be found below:
To Reproduce
Steps to reproduce the behavior:
<Graph />
component withoutlinks
in the datalinks
data)Expected behavior
We should see a custom error that will point developers into the right direction, something like
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
All
The text was updated successfully, but these errors were encountered: