mapshaper 0.6.28 → 0.6.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/mapshaper.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function () {
2
2
 
3
- var VERSION = "0.6.28";
3
+ var VERSION = "0.6.29";
4
4
 
5
5
 
6
6
  var utils = /*#__PURE__*/Object.freeze({
@@ -38420,9 +38420,11 @@ ${svg}
38420
38420
 
38421
38421
  // @geoType: optional geometry type (polygon, polyline, point, null);
38422
38422
  ctx.layer_exists = function(name, geoType) {
38423
- var targets = catalog.findCommandTargets(name, geoType);
38424
- if (targets.length === 0) return false;
38425
- return true;
38423
+ try {
38424
+ var targets = catalog.findCommandTargets(name, geoType);
38425
+ if (targets.length > 0) return true;
38426
+ } catch(e) {}
38427
+ return false;
38426
38428
  };
38427
38429
 
38428
38430
  ctx.file_exists = function(file) {
@@ -40949,7 +40951,7 @@ ${svg}
40949
40951
  } else {
40950
40952
  moduleName = opts.module;
40951
40953
  }
40952
- if (moduleFile) {
40954
+ if (moduleFile && !require$1('path').isAbsolute(moduleFile)) {
40953
40955
  moduleFile = require$1('path').join(process.cwd(), moduleFile);
40954
40956
  }
40955
40957
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapshaper",
3
- "version": "0.6.28",
3
+ "version": "0.6.29",
4
4
  "description": "A tool for editing vector datasets for mapping and GIS.",
5
5
  "keywords": [
6
6
  "shapefile",
package/www/mapshaper.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function () {
2
2
 
3
- var VERSION = "0.6.28";
3
+ var VERSION = "0.6.29";
4
4
 
5
5
 
6
6
  var utils = /*#__PURE__*/Object.freeze({
@@ -38420,9 +38420,11 @@ ${svg}
38420
38420
 
38421
38421
  // @geoType: optional geometry type (polygon, polyline, point, null);
38422
38422
  ctx.layer_exists = function(name, geoType) {
38423
- var targets = catalog.findCommandTargets(name, geoType);
38424
- if (targets.length === 0) return false;
38425
- return true;
38423
+ try {
38424
+ var targets = catalog.findCommandTargets(name, geoType);
38425
+ if (targets.length > 0) return true;
38426
+ } catch(e) {}
38427
+ return false;
38426
38428
  };
38427
38429
 
38428
38430
  ctx.file_exists = function(file) {
@@ -40949,7 +40951,7 @@ ${svg}
40949
40951
  } else {
40950
40952
  moduleName = opts.module;
40951
40953
  }
40952
- if (moduleFile) {
40954
+ if (moduleFile && !require$1('path').isAbsolute(moduleFile)) {
40953
40955
  moduleFile = require$1('path').join(process.cwd(), moduleFile);
40954
40956
  }
40955
40957
  try {