Skip to content

Commit 6a88b7f

Browse files
committed
fix limit=1 on reverse geocodes when single type set
1 parent 396b2c1 commit 6a88b7f

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
@@ -692,7 +692,7 @@ MapboxGeocoder.prototype = {
692692

693693
config = extend(config,
694694
this.options.version === 'v6' ? { longitude: coords[0], latitude: coords[1]} : { query: coords },
695-
{limit: 1 }
695+
!config.types || config.types.length !== 1 ? {limit: 1 } : {}
696696
);
697697
} break;
698698
case GEOCODE_REQUEST_TYPE.FORWARD: {

0 commit comments

Comments
 (0)