Skip to content

Commit fc4b00a

Browse files
committed
Update aux coordinate regex
1 parent 07c3707 commit fc4b00a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ MapboxGeocoder.prototype = {
648648
case GEOCODE_REQUEST_TYPE.FORWARD: {
649649
// Ensure that any reverse geocoding looking request is cleaned up
650650
// to be processed as only a forward geocoding request by the server.
651-
const reverseGeocodeCoordRgx = /^[ ]*(-?\d{1,3}(\.\d{0,256})?)[, ]+(-?\d{1,3}(\.\d{0,256})?)*[ ]*$/;
651+
const reverseGeocodeCoordRgx = /^[ ]*(-?\d{1,3}(\.\d{0,256})?)[, ]+(-?\d{1,3}(\.\d{0,256})?)?[ ]*$/;
652652
if (reverseGeocodeCoordRgx.test(search)) {
653653
search = search.replace(/,/g, ' ');
654654
}

0 commit comments

Comments
 (0)