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

🐛 [#2597] Prevent Line Chart from crashing when having no data #2669

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

akassaei
Copy link
Contributor

This PR fixes issue described on #2597
The issue we had was that we are calling delaunay.find function on empty data, it was fixed on their side but new version was not deployed yet so we still need to make a fix around this.
The simple fix I found was to early return when we have nodes.length === 0.
I've also added a simple test around Line Chart

Copy link

vercel bot commented Nov 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nivo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 5:44pm

@plouc plouc merged commit cdf60f7 into plouc:master Nov 15, 2024
4 of 5 checks passed
@plouc
Copy link
Owner

plouc commented Nov 15, 2024

@akassaei, thank you for your contribution!

Copy link
Owner

@plouc plouc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akassaei
Copy link
Contributor Author

akassaei commented Nov 15, 2024

Thanks a lot for the review and the time that you put in this project @plouc 🙏 ❤️

venky-0710 pushed a commit to anarock/nivo that referenced this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants