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