diff options
author | Anton Tananaev <anton@traccar.org> | 2023-03-14 08:14:01 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-03-14 08:14:01 -0700 |
commit | cb0f64ecd9bf1de543d6a30f65fdddb92b4d926a (patch) | |
tree | 8fa22e749dbbc5810265be47dfd2da4e90ad3252 /modern/src/map/core/mapUtil.js | |
parent | f47808abac9d20f8324147024bb25d1a5dca9a98 (diff) | |
download | trackermap-web-cb0f64ecd9bf1de543d6a30f65fdddb92b4d926a.tar.gz trackermap-web-cb0f64ecd9bf1de543d6a30f65fdddb92b4d926a.tar.bz2 trackermap-web-cb0f64ecd9bf1de543d6a30f65fdddb92b4d926a.zip |
Fix line geofence
Diffstat (limited to 'modern/src/map/core/mapUtil.js')
-rw-r--r-- | modern/src/map/core/mapUtil.js | 2 |
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)); |