homeflowjs 0.13.11 → 0.13.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homeflowjs",
3
- "version": "0.13.11",
3
+ "version": "0.13.12",
4
4
  "sideEffects": [
5
5
  "modal/**/*",
6
6
  "user/default-profile/**/*",
@@ -190,13 +190,13 @@ export default class GeonamesMap extends DraggableMap {
190
190
  }
191
191
 
192
192
  getMarkerBounds() {
193
- const { polygon } = store.getState().search.currentSearch?.place;
193
+ const polygon = store.getState().search.currentSearch?.place?.polygon;
194
194
  if (this.viewport) {
195
195
  const viewportBounds = this.getViewportBounds();
196
196
  if (viewportBounds.flat().find(coordinate => coordinate === Infinity)) return null;
197
197
 
198
198
  return L.latLngBounds(...viewportBounds.map(bound => L.latLng(...bound)));
199
- } else if (polygon && polygon.length) {
199
+ } else if (polygon && polygon?.length) {
200
200
  const polyBounds = [this.getTopRightPolygonCoordinates(polygon[0]), this.getBottomLeftPolygonCoordinates(polygon[0])];
201
201
  const options = Homeflow.get('custom_map_bounds_padding')
202
202
  const latLongBounds = L.latLngBounds(...polyBounds.map(bound => L.latLng(...bound)));