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 nulland undefined. It happens that, for these arguments, the method throws the following error:
Uncaught Error: 'undefined' is no valid coordinate.
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, includingnull
andundefined
. It happens that, for these arguments, the method throws the following error:Uncaught Error: 'undefined' is no valid coordinate.