diff --git a/mapshaper-gui.js b/mapshaper-gui.js index 81e3eecd..b6c53158 100644 --- a/mapshaper-gui.js +++ b/mapshaper-gui.js @@ -10779,11 +10779,16 @@ // finish the path if a vertex is selected (but not an interpolated point) var finish = hoverVertexInfo?.type == 'vertex'; if (getLastArcLength(target) < 2) { - error$1('Defective path'); + stop$1('Defective path'); } if (finish && polygonMode()) { shapes1 = target.shapes.slice(initialShapeCount); - shapes2 = convertClosedPaths(shapes1); + try { + shapes2 = convertClosedPaths(shapes1); + } catch(e) { + console.error(e); + stop$1('Invalid path'); + } } if (shapes2) { replaceDrawnShapes(shapes2); diff --git a/mapshaper.js b/mapshaper.js index 8c2e2b60..d7c450e7 100644 --- a/mapshaper.js +++ b/mapshaper.js @@ -45536,7 +45536,7 @@ ${svg} }); } - var version = "0.6.83"; + var version = "0.6.84"; // Parse command line args into commands and run them // Function takes an optional Node-style callback. A Promise is returned if no callback is given.