Fix js error in case markers array is empty
This commit is contained in:
@@ -48,7 +48,7 @@
|
|||||||
}
|
}
|
||||||
marker.addTo(this.map);
|
marker.addTo(this.map);
|
||||||
this.map.setView(position);
|
this.map.setView(position);
|
||||||
} else if (this.markers) {
|
} else if (this.markers.length) {
|
||||||
const bounds = L.latLngBounds();
|
const bounds = L.latLngBounds();
|
||||||
for (let item of this.markers) {
|
for (let item of this.markers) {
|
||||||
const position = L.latLng(item.lat, item.lng);
|
const position = L.latLng(item.lat, item.lng);
|
||||||
|
|||||||
Reference in New Issue
Block a user