From a1dffb23dbc3514c35729ab45460e67ebf337275 Mon Sep 17 00:00:00 2001 From: corsacca Date: Tue, 5 May 2026 14:18:53 +0100 Subject: [PATCH] Catch prayer map errors. --- app/components/public/PrayerMap.vue | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) 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()