aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/MapPositions.js
diff options
context:
space:
mode:
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]);