@dra2020/baseclient 1.0.35 → 1.0.36

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/lib/poly/topo.ts CHANGED
@@ -19,11 +19,16 @@ export type Topo = any;
19
19
 
20
20
  function getGEOID(f: any): string
21
21
  {
22
- if (f.features && f.features.length) f = f.features[0];
23
- else if (Array.isArray(f)) f = f[0];
22
+ if (f.features && f.features.length)
23
+ f = f.features[0];
24
+ else if (Array.isArray(f))
25
+ f = f[0];
26
+ else
27
+ return '';
24
28
  if (f.properties.id !== undefined) return 'id';
25
29
  if (f.properties.GEOID !== undefined) return 'GEOID';
26
30
  if (f.properties.GEOID10 !== undefined) return 'GEOID10';
31
+ return '';
27
32
  }
28
33
 
29
34
  export function topoFromCollection(col: any): Topo
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dra2020/baseclient",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "description": "Utility functions for Javascript projects.",
5
5
  "main": "dist/baseclient.js",
6
6
  "types": "./dist/all/all.d.ts",