geocoder-js icon indicating copy to clipboard operation
geocoder-js copied to clipboard

Error if no coordinates are found for the given address (OSM Provider in geocoder.js)

Open loicpascal opened this issue 6 years ago • 0 comments

If I try to get the coordonates for a given address that not exists in OSM referential, the b.address.house_number returns error because of the undefined b.address. It try to get house_number on undefined.

It is necessary to return false (or equivalent) when no coordonate are found.

I corrected the mistake by adding if (b.length === 0) { return false; } before returning all values at line 406.

loicpascal avatar Jan 17 '19 17:01 loicpascal