From da50bff42c76707875589bfa719ad4cea7add497 Mon Sep 17 00:00:00 2001 From: Shane Loeffler Date: Fri, 7 Jun 2024 15:30:53 -0500 Subject: [PATCH] more lenient longitude handling --- src/region/region-picker/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/region/region-picker/index.js b/src/region/region-picker/index.js index d5e7f0f..6ff2eb7 100644 --- a/src/region/region-picker/index.js +++ b/src/region/region-picker/index.js @@ -20,10 +20,10 @@ function getInitialRadius(map, units, minRadius, maxRadius) { function isValidCoordinate(longitude, latitude) { return ( - longitude !== undefined && - latitude !== undefined && - longitude >= -180 && - longitude <= 180 && + typeof longitude === 'number' && + typeof latitude === 'number' && + !isNaN(longitude) && + !isNaN(latitude) && latitude >= -90 && latitude <= 90 )