From cb0f64ecd9bf1de543d6a30f65fdddb92b4d926a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 14 Mar 2023 08:14:01 -0700 Subject: Fix line geofence --- modern/src/map/core/mapUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modern/src/map/core/mapUtil.js') 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)); -- cgit v1.2.3