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

fix(voronoi): length undefined in production #1441

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

sueannioanis
Copy link
Contributor

@sueannioanis sueannioanis commented Mar 7, 2021

This will fix unique key issues & length of undefined for voronoi.

Dev (Warning only shows in dev. The undefined error happens after a few seconds.):
Screen Shot 2021-03-06 at 9 37 51 PM

Prod (The undefined error happens after a few seconds.):
Screen Shot 2021-03-06 at 9 42 53 PM

Fix:
Screen Shot 2021-03-07 at 12 30 14 AM


❤️ this project. i contributed in opencollective.com/nivo.

@sueannioanis sueannioanis force-pushed the sue/fix-length-undefined branch from d0dc967 to 6451552 Compare March 7, 2021 02:59
@sueannioanis sueannioanis changed the title (voronoi) fix length undefined in production fix(voronoi) length undefined in production Mar 7, 2021
@sueannioanis sueannioanis force-pushed the sue/fix-length-undefined branch from 6451552 to 91747a1 Compare March 7, 2021 03:03
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 7, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3784924:

Sandbox Source
nivo Configuration
nivo-website Configuration

@sueannioanis sueannioanis force-pushed the sue/fix-length-undefined branch 2 times, most recently from 73630cc to 06b41cd Compare March 7, 2021 03:19
@sueannioanis sueannioanis force-pushed the sue/fix-length-undefined branch from 7c9688a to 3784924 Compare March 7, 2021 05:32
@sueannioanis sueannioanis marked this pull request as ready for review March 7, 2021 05:32
@sueannioanis sueannioanis changed the title fix(voronoi) length undefined in production fix(voronoi): length undefined in production Mar 7, 2021
}

const poly = voronoi.cellPolygon(i)
const poly = voronoi.cellPolygon(i) || []
Copy link
Contributor Author

@sueannioanis sueannioanis Mar 10, 2021

Choose a reason for hiding this comment

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

Defaulting here fixes the error. For some reason, .cellPolygon is returning null sometimes. I could dig deeper.

Copy link
Contributor

@wyze wyze left a comment

Choose a reason for hiding this comment

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

Awesome, thank you!

@wyze wyze merged commit 80a9c37 into plouc:master Apr 21, 2021
@sueannioanis sueannioanis deleted the sue/fix-length-undefined branch April 21, 2021 14:18
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