@dra2020/baseclient 1.0.94 → 1.0.95

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/geo/geo.ts CHANGED
@@ -297,24 +297,29 @@ export class GeoMultiCollection
297
297
  // Add the "all" collection from the passed in multi, but do not force compute of any things not computed yet.
298
298
  addAll(tag: string, multi: GeoMultiCollection): void
299
299
  {
300
- let nEntries = Util.countKeys(multi.entries);
301
- if (nEntries)
300
+ if (multi == null || Util.isEmpty(multi.entries))
301
+ this.remove(tag);
302
+ else
302
303
  {
303
- // Make sure all collection is created
304
- if (!multi.all.topo && !multi.all.col && !multi.all.map)
304
+ let nEntries = Util.countKeys(multi.entries);
305
+ if (nEntries)
305
306
  {
306
- // Create cheapest one (collection if I need to create, otherwise copy from single entry)
307
- if (nEntries > 1)
308
- multi.allCol();
309
- else
307
+ // Make sure all collection is created
308
+ if (!multi.all.topo && !multi.all.col && !multi.all.map)
310
309
  {
311
- let e = multi.nthEntry(0);
312
- multi.all.topo = e.topo;
313
- multi.all.col = e.col;
314
- multi.all.map = e.map;
310
+ // Create cheapest one (collection if I need to create, otherwise copy from single entry)
311
+ if (nEntries > 1)
312
+ multi.allCol();
313
+ else
314
+ {
315
+ let e = multi.nthEntry(0);
316
+ multi.all.topo = e.topo;
317
+ multi.all.col = e.col;
318
+ multi.all.map = e.map;
319
+ }
315
320
  }
321
+ this.add(tag, multi.all.topo, multi.all.col, multi.all.map);
316
322
  }
317
- this.add(tag, multi.all.topo, multi.all.col, multi.all.map);
318
323
  }
319
324
  }
320
325
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dra2020/baseclient",
3
- "version": "1.0.94",
3
+ "version": "1.0.95",
4
4
  "description": "Utility functions for Javascript projects.",
5
5
  "main": "dist/baseclient.js",
6
6
  "types": "./dist/all/all.d.ts",