homeflowjs 1.0.26 → 1.0.27

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": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "sideEffects": [
5
5
  "modal/**/*",
6
6
  "user/default-profile/**/*",
@@ -270,8 +270,13 @@ export default class DraggableMap {
270
270
  }
271
271
 
272
272
  generateMap(map_options) {
273
- const zoomMax = Homeflow.get('custom_max_zoom') !== null? Homeflow.get('custom_max_zoom') : 16;
274
- const zoomMin = Homeflow.get('custom_min_zoom') !== null ? Homeflow.get('custom_min_zoom') : 6;
273
+ const zoomMax = (Homeflow.get('custom_max_zoom') !== null && Homeflow.get('custom_max_zoom') !== undefined)
274
+ ? Homeflow.get('custom_max_zoom')
275
+ : 16;
276
+ const zoomMin = (Homeflow.get('custom_min_zoom') !== null && Homeflow.get('custom_min_zoom') !== undefined)
277
+ ? Homeflow.get('custom_min_zoom')
278
+ : 6;
279
+
275
280
  const zoomPosition = Homeflow.get('custom_map_zoom_location') ? Homeflow.get('custom_map_zoom_location') : '';
276
281
 
277
282
  if (map_options == null) {
@@ -49,8 +49,12 @@ export default class DrawableMap extends DraggableMap {
49
49
  }
50
50
 
51
51
  generateMap(map_options) {
52
- const zoomMax = Homeflow.get('custom_max_zoom') ? Homeflow.get('custom_max_zoom') : 16;
53
- const zoomMin = Homeflow.get('custom_min_zoom') !== null ? Homeflow.get('custom_min_zoom') : 6;
52
+ const zoomMax = (Homeflow.get('custom_max_zoom') !== null && Homeflow.get('custom_max_zoom') !== undefined)
53
+ ? Homeflow.get('custom_max_zoom')
54
+ : 16;
55
+ const zoomMin = (Homeflow.get('custom_min_zoom') !== null && Homeflow.get('custom_min_zoom') !== undefined)
56
+ ? Homeflow.get('custom_min_zoom')
57
+ : 6;
54
58
  const drawLocation = Homeflow.get('custom_map_draw_location') ? Homeflow.get('custom_map_draw_location') : 'bottomleft';
55
59
 
56
60
  map_options = {