aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-03-14 08:14:01 -0700
committerAnton Tananaev <anton@traccar.org>2023-03-14 08:14:01 -0700
commitcb0f64ecd9bf1de543d6a30f65fdddb92b4d926a (patch)
tree8fa22e749dbbc5810265be47dfd2da4e90ad3252 /modern/src/map
parentf47808abac9d20f8324147024bb25d1a5dca9a98 (diff)
downloadtrackermap-web-cb0f64ecd9bf1de543d6a30f65fdddb92b4d926a.tar.gz
trackermap-web-cb0f64ecd9bf1de543d6a30f65fdddb92b4d926a.tar.bz2
trackermap-web-cb0f64ecd9bf1de543d6a30f65fdddb92b4d926a.zip
Fix line geofence
Diffstat (limited to 'modern/src/map')
-rw-r--r--modern/src/map/core/mapUtil.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/modern/src/map/core/mapUtil.js b/modern/src/map/core/mapUtil.js
index 23805a3f..feb458d6 100644
--- a/modern/src/map/core/mapUtil.js
+++ b/modern/src/map/core/mapUtil.js
@@ -52,7 +52,7 @@ export const reverseCoordinates = (it) => {
if (!it) {
return it;
} if (Array.isArray(it)) {
- if (it.length === 2 && !Number.isNaN(it[0]) && !Number.isNaN(it[1])) {
+ if (it.length === 2 && typeof it[0] === 'number' && typeof it[1] === 'number') {
return [it[1], it[0]];
}
return it.map((it) => reverseCoordinates(it));