aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/MapPositions.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-10-16 18:30:55 -0700
committerAnton Tananaev <anton@traccar.org>2022-10-16 18:30:55 -0700
commit79841c3f94ff2e50f51c38907ba2923735611af5 (patch)
treebb4a35cedc210c7fa8ecb61dfd83066baa2e855a /modern/src/map/MapPositions.js
parent6bfe52d4e0578ea83761ff174ae6dc205b97a4ac (diff)
downloadtrackermap-web-79841c3f94ff2e50f51c38907ba2923735611af5.tar.gz
trackermap-web-79841c3f94ff2e50f51c38907ba2923735611af5.tar.bz2
trackermap-web-79841c3f94ff2e50f51c38907ba2923735611af5.zip
Add route points
Diffstat (limited to 'modern/src/map/MapPositions.js')
-rw-r--r--modern/src/map/MapPositions.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/modern/src/map/MapPositions.js b/modern/src/map/MapPositions.js
index 5e09bc9c..704c24bd 100644
--- a/modern/src/map/MapPositions.js
+++ b/modern/src/map/MapPositions.js
@@ -35,7 +35,7 @@ const MapPositions = ({ positions, onClick, showStatus, selectedPosition }) => {
const onMouseLeave = () => map.getCanvas().style.cursor = '';
const onMapClick = useCallback((event) => {
- if (!event.defaultPrevented) {
+ if (!event.defaultPrevented && onClick) {
onClick();
}
}, [onClick]);