Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

.find() throws exception when data contains two elements on the same same position #21

Closed
wereHamster opened this issue Dec 7, 2016 · 0 comments
Assignees

Comments

@wereHamster
Copy link

d3-voronoi v1.1.0

const v = d3.voronoi()([[0,0], [0,0]]);
v.find(0, 0); // <- Uncaught TypeError: Cannot read property 'site' of undefined(…)

If you inspect v.cells you'll see that the first item in the array is undefined instead of a cell object.

v.triangles() also throws an exception, although a different message. And v.triangles() returns an array where the first element is undefined.

The documentation doesn't mention exceptions at all, which is why I didn't expect them.

@mbostock mbostock self-assigned this Jan 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants