@dra2020/baseclient 1.0.114 → 1.0.115

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.
@@ -2756,20 +2756,24 @@ class GeoMultiCollection {
2756
2756
  if (!this.all.topo) {
2757
2757
  // optimise case where one entry
2758
2758
  let n = this.nEntries;
2759
+ let e = this.nthEntry(0);
2759
2760
  if (n == 1) {
2760
- let e = this.nthEntry(0);
2761
2761
  this.all.topo = this._topo(e);
2762
2762
  this.all.col = this.all.col || e.col;
2763
2763
  this.all.map = this.all.map || e.map;
2764
2764
  }
2765
- else {
2765
+ else if (e.topo) {
2766
2766
  // Old-style, goes through map (to filter hidden) and then collection
2767
2767
  // this.all.topo = geoCollectionToTopoNonNull(this.allCol());
2768
2768
  // New style, use splice on packed topologies
2769
+ let filterout = Util.isEmpty(this.hidden) ? null : this.hidden; // splice function requires NULL for empty
2769
2770
  let topoarray = Object.values(this.entries).filter((e) => this._length(e) > 0)
2770
- .map((e) => { return { topology: this._topo(e), filterout: this.hidden }; });
2771
+ .map((e) => { return { topology: this._topo(e), filterout }; });
2771
2772
  this.all.topo = topoarray.length == 0 ? null : topoarray.length == 1 ? topoarray[0].topology : Poly.topoSplice(topoarray);
2772
2773
  }
2774
+ else
2775
+ // Old-style, goes through map (to filter hidden) and then collection
2776
+ this.all.topo = geoCollectionToTopoNonNull(this.allCol());
2773
2777
  }
2774
2778
  return this.all.topo;
2775
2779
  }