-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
When performing union of non-empty polygon and empty polygon, the union works as expected:
const nonEmpty = [
[0, 0],
[0, 1],
[1, 1],
[1, 0],
];
const empty = [
[0, 0],
[0, 0],
[0, 0],
[0, 0],
];
polygon.union(nonEmpty, empty)
// returns:
// [
// [
// [1, 1],
// [0, 1],
// [0, 0],
// [1, 0],
// ]
// ]However doing it the other way around causes an error:
polygon.union(empty, nonEmpty)TypeError: Invalid attempt to destructure non-iterable instance
❯ node_modules/polygon-tools/lib/tesselator.js:8:585
❯ Tesselator.run node_modules/polygon-tools/lib/tesselator.js:234:19
❯ Object.run node_modules/polygon-tools/lib/tesselator.js:354:27
❯ Object.union node_modules/polygon-tools/lib/polygon.js:346:15
Using polygon-tools 0.4.8
Metadata
Metadata
Assignees
Labels
No labels