Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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

wants to merge 1 commit into from

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