diff options
Diffstat (limited to 'modern/src/map')
-rw-r--r-- | modern/src/map/core/MapView.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modern/src/map/core/MapView.js b/modern/src/map/core/MapView.js index 2c49b8ba..35b3a65a 100644 --- a/modern/src/map/core/MapView.js +++ b/modern/src/map/core/MapView.js @@ -91,8 +91,9 @@ const MapView = ({ children }) => { }, [mapboxAccessToken]); useEffect(() => { - const filteredStyles = mapStyles.filter((style) => style.available && activeMapStyles.includes(style.id)); - switcher.updateStyles(filteredStyles, defaultMapStyle); + const filteredStyles = mapStyles.filter((s) => s.available && activeMapStyles.includes(s.id)); + const styles = filteredStyles.length ? filteredStyles : mapStyles.filter((s) => s.id === 'osm'); + switcher.updateStyles(styles, defaultMapStyle); }, [mapStyles, defaultMapStyle]); useEffect(() => { |