diff --git a/app/components/public/PrayerMap.vue b/app/components/public/PrayerMap.vue index 7dc017ea..88e4d90e 100644 --- a/app/components/public/PrayerMap.vue +++ b/app/components/public/PrayerMap.vue @@ -292,15 +292,20 @@ onMounted(async () => { mapboxgl.accessToken = mapboxToken - map = new mapboxgl.Map({ - container: containerRef.value, - style: 'mapbox://styles/mapbox/light-v11', - projection: 'mercator', - center: [20, 10], - zoom: 1.5, - minZoom: 1, - maxZoom: 12 - }) + try { + map = new mapboxgl.Map({ + container: containerRef.value, + style: 'mapbox://styles/mapbox/light-v11', + projection: 'mercator', + center: [20, 10], + zoom: 1.5, + minZoom: 1, + maxZoom: 12 + }) + } catch (err) { + console.error('Prayer map: failed to initialize map', err) + return + } map.addControl(new mapboxgl.NavigationControl(), 'top-right') map.scrollZoom.disable()