manuelbieh/geolib

isValidCoordinate throws with null and undefined

Opened this issue · 0 comments

When using geolib.isValidCoordinate to validate input of a function that use geolib calculations, I would expect this method to return false for invalid input coordinates, including null and undefined. It happens that, for these arguments, the method throws the following error:
Uncaught Error: 'undefined' is no valid coordinate.