Skip to content

Commit

Permalink
more lenient longitude handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane98c committed Jun 7, 2024
1 parent 5771764 commit da50bff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/region/region-picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit da50bff

Please sign in to comment.