@dra2020/baseclient 1.0.100 → 1.0.101
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/dist/baseclient.js +4 -0
- package/dist/baseclient.js.map +1 -1
- package/lib/poly/polypack.ts +3 -0
- package/package.json +1 -1
package/dist/baseclient.js
CHANGED
|
@@ -8487,6 +8487,8 @@ function polyPackSize(coords) {
|
|
|
8487
8487
|
// Null feature?
|
|
8488
8488
|
if (coords == null || (coords.length !== undefined && coords.length == 0))
|
|
8489
8489
|
return 0;
|
|
8490
|
+
if (!Array.isArray(coords))
|
|
8491
|
+
return 0;
|
|
8490
8492
|
let depth = Util.depthof(coords);
|
|
8491
8493
|
if (depth == 3)
|
|
8492
8494
|
coords = [[coords]];
|
|
@@ -8684,6 +8686,8 @@ function polyPack(coords, prepack) {
|
|
|
8684
8686
|
if (coords && coords.geometry)
|
|
8685
8687
|
coords = coords.geometry.coordinates;
|
|
8686
8688
|
// Transparently handle polygon or multi-polygon
|
|
8689
|
+
if (!Array.isArray(coords))
|
|
8690
|
+
return null;
|
|
8687
8691
|
let depth = Util.depthof(coords);
|
|
8688
8692
|
if (depth == 2)
|
|
8689
8693
|
coords = [[[coords]]];
|