Skip to content

Commit 8467069

Browse files
committed
fix error ClipperLib.IntPoint is not a constructor
1 parent 93717cc commit 8467069

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,15 +307,15 @@ function mapLowerToCapital(path) {
307307
}
308308

309309
function vectorToCapital({ x, y }) {
310-
return new ClipperLib.IntPoint(x, y);
310+
return { X: x, Y: y };
311311
}
312312

313313
function mapToRound(path) {
314314
return path.map(roundVector);
315315
}
316316

317317
function roundVector({ X, Y }) {
318-
return new ClipperLib.IntPoint(Math.round(X), Math.round(Y));
318+
return new { X: Math.round(X), Y: Math.round(Y) };
319319
}
320320

321321
function filterPathsDuplicates(path) {

0 commit comments

Comments
 (0)