Skip to content

Commit 8460ea5

Browse files
fix test
1 parent c52770a commit 8460ea5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,8 @@ MapboxGeocoder.prototype = {
685685
// client only accepts one type for reverseGeocode, so
686686
// use first config type if one, if not default to poi for v5 and address for v6
687687
const defaultType = this.options.version === 'v6' ? ["address"] : ["poi"];
688-
config.types = config.types ? [config.types[0]] : defaultType;
688+
// [TODO]: possibly remove. client can accept more than one type. also assigning something to config.types can break backward compatibility
689+
config.types ? [config.types[0]] : defaultType;
689690
config = extend(config,
690691
this.options.version === 'v6' ? { longitude: coords[0], latitude: coords[1]} : { query: coords },
691692
{limit: 1 }

0 commit comments

Comments
 (0)