Fix js error in case markers array is empty

This commit is contained in:
Björn Fromme
2018-10-09 14:08:09 +02:00
parent 87579d809b
commit 68957427a8
@@ -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);