From 68957427a891a8173fff055738fb4bf18929297e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Tue, 9 Oct 2018 14:08:09 +0200 Subject: [PATCH] Fix js error in case markers array is empty --- .../ep_theme/Resources/Private/Assets/js/components/OsmMap.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/OsmMap.vue b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/OsmMap.vue index 85b7f179..a749c823 100644 --- a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/OsmMap.vue +++ b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/OsmMap.vue @@ -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);