From d8a13efd91b7f8b5a4eef511361e583e60d00514 Mon Sep 17 00:00:00 2001 From: Matthew Bloch Date: Thu, 4 Apr 2024 14:40:40 -0400 Subject: [PATCH] Update website --- mapshaper-gui.js | 9 +++++++-- mapshaper.js | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) 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.