diff options
Diffstat (limited to 'modern/src/map/AccuracyMap.js')
-rw-r--r-- | modern/src/map/AccuracyMap.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modern/src/map/AccuracyMap.js b/modern/src/map/AccuracyMap.js index 4baa1054..5734ee82 100644 --- a/modern/src/map/AccuracyMap.js +++ b/modern/src/map/AccuracyMap.js @@ -36,8 +36,12 @@ const AccuracyMap = () => { }); return () => { - map.removeLayer(id); - map.removeSource(id); + if (map.getLayer(id)) { + map.removeLayer(id); + } + if (map.getSource(id)) { + map.removeSource(id); + } }; }, []); |