Skip to content

- Honour "addressdetails: 0" in options.#1

Open
lyle-sigurdson wants to merge 1 commit intodynmeth:masterfrom
lyle-sigurdson:master
Open

- Honour "addressdetails: 0" in options.#1
lyle-sigurdson wants to merge 1 commit intodynmeth:masterfrom
lyle-sigurdson:master

Conversation

@lyle-sigurdson
Copy link

When I tried addressdetails: 0 when passing options to nominatim.search, I noticed that it was still specifying addressdetails: 1 (the default) to nominatim.openstreemap.org.

The problem is in the check to see if the passed in options object already has the keys the defaults object has.

You're actually checking against the value of the key in the passed in options, so if a value is 0, the logic overwrites the passed in option with the default.

My fix checks to see if the value is defined instead of checking truthyness.

My fix isn't tested extensively, but it is working for my situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant