proximiio-js-library 1.9.0 → 1.9.1

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.
@@ -554,8 +554,9 @@ var Map = /** @class */ (function () {
554
554
  if (e.features && e.features[0] && e.features[0].properties) {
555
555
  if (this.defaultOptions.initPolygons) {
556
556
  // @ts-ignore
557
- var poi = this.state.allFeatures.features.find(function (i) { return i.properties.id === e.features[0].properties.poi_id; });
558
- this.onPolygonClickListener.next(poi);
557
+ var polygonPoi = this.state.allFeatures.features.find(function (i) { return i.properties.id === e.features[0].properties.poi_id; });
558
+ var poi = this.state.allFeatures.features.find(function (i) { return i.properties.id === e.features[0].properties.id; });
559
+ this.onPolygonClickListener.next(polygonPoi ? polygonPoi : poi);
559
560
  }
560
561
  else {
561
562
  // @ts-ignore