@nextgis/leaflet-map-adapter 3.0.0-alpha.12 → 3.0.0-alpha.13

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.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/leaflet-map-adapter; version: 3.0.0-alpha.5; author: NextGIS */
1
+ /** Bundle of @nextgis/leaflet-map-adapter; version: 3.0.0-alpha.13; author: NextGIS */
2
2
  import { EventEmitter } from 'events';
3
3
  import { Control, DomEvent, GeoJSON, DivIcon, Marker, CircleMarker, FeatureGroup, ImageOverlay as ImageOverlay$1, Layer, Util, CRS, GridLayer, DomUtil, TileLayer as TileLayer$1, Map, latLngBounds, latLng } from 'leaflet';
4
4
  import { defined, debounce as debounce$1, updateUrlParams } from '@nextgis/utils';
@@ -875,13 +875,15 @@ class GeoJsonAdapter extends BaseAdapter {
875
875
  const unselectOnClose = (_b = (_a = this.options.popupOptions) == null ? void 0 : _a.unselectOnClose) != null ? _b : true;
876
876
  if (unselectOnClose) {
877
877
  const p = layer.getPopup();
878
- p && p.once(
879
- "remove",
880
- () => {
881
- close();
882
- },
883
- this
884
- );
878
+ if (p) {
879
+ p.once(
880
+ "remove",
881
+ () => {
882
+ close();
883
+ },
884
+ this
885
+ );
886
+ }
885
887
  }
886
888
  this._openedPopup.push([popup, _closeHandlers, def]);
887
889
  popup.openPopup(latLng);
@@ -1877,7 +1879,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
1877
1879
  }
1878
1880
  }
1879
1881
  removeLayer(layer) {
1880
- layer && layer.remove && layer.remove();
1882
+ if (layer && layer.remove) layer.remove();
1881
1883
  }
1882
1884
  showLayer(layer) {
1883
1885
  if (this.map) {