diff options
author | rahighi <rahighi> | 2021-08-26 13:11:23 +0430 |
---|---|---|
committer | rahighi <rahighi> | 2021-08-26 13:11:23 +0430 |
commit | d4c38aa96f8404f3178031592e773a72b30df533 (patch) | |
tree | faf0bfada7b5d98b3cbe34230a7628ba6d16a030 /modern/src/map/ReplayPathMap.js | |
parent | b18da8ebebca5d40fb58fa270530cb9b048ff6ec (diff) | |
download | etbsa-traccar-web-d4c38aa96f8404f3178031592e773a72b30df533.tar.gz etbsa-traccar-web-d4c38aa96f8404f3178031592e773a72b30df533.tar.bz2 etbsa-traccar-web-d4c38aa96f8404f3178031592e773a72b30df533.zip |
Merge branch 'master' of https://github.com/traccar/traccar-web
Diffstat (limited to 'modern/src/map/ReplayPathMap.js')
-rw-r--r-- | modern/src/map/ReplayPathMap.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modern/src/map/ReplayPathMap.js b/modern/src/map/ReplayPathMap.js index 62b3f27..022548b 100644 --- a/modern/src/map/ReplayPathMap.js +++ b/modern/src/map/ReplayPathMap.js @@ -31,8 +31,12 @@ const ReplayPathMap = ({ positions }) => { }); return () => { - map.removeLayer(id); - map.removeSource(id); + if (map.getLayer(id)) { + map.removeLayer(id); + } + if (map.getSource(id)) { + map.removeSource(id); + } }; }, []); |