diff --git a/src/landscape/components/LandscapeListMap.js b/src/landscape/components/LandscapeListMap.js index acbe3b1a1..e461acf26 100644 --- a/src/landscape/components/LandscapeListMap.js +++ b/src/landscape/components/LandscapeListMap.js @@ -203,9 +203,12 @@ const Clusters = props => { new mapboxgl.LngLatBounds() ); - map.fitBounds(bounds, { - padding: 50, - }); + if (!bounds.isEmpty()) { + map.fitBounds(bounds, { + padding: 50, + }); + } + return () => { map.off('click', 'clusters', onClusterClick); map.off('click', 'unclustered-point', onUnclusteredPointClick);