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

country.nativeName('GB') returns undefined because multiple countries use the same ISO code #26

Closed
teddyhwang opened this issue Aug 9, 2015 · 6 comments

Comments

@teddyhwang
Copy link

United Kingdom and Scotland has the same ISO code of GB and GBR. Any countries that call upon GB conflict with the two entries and the Scotland data is returned first.

@teddyhwang teddyhwang changed the title country.nativeName('GB') returns undefined because multiple countries use the same GB code country.nativeName('GB') returns undefined because multiple countries use the same ISO code Aug 9, 2015
@therebelrobot
Copy link
Owner

Fair enough. I was unaware that multiple countries could have the same ISO code. That call should probably return an array of countries, rather than a single object. I'll take a look at that today.

@teddyhwang
Copy link
Author

FYI, there are several other calls (e.g country.name) that would have the same problem.

@therebelrobot
Copy link
Owner

I am aware. The fix I'm rolling would effect all searches.

@teddyhwang
Copy link
Author

👍

@therebelrobot
Copy link
Owner

Also, be aware, we also have a possibly large API change in the works, the fix for this will most likely be rolled with that one. refer #19

@therebelrobot
Copy link
Owner

A fix for this has been pushed into the release/2.0.0-alpha branch. Feel free to use that branch if you need the change quickly, but as it entails a major API change, I can't publish it just yet to NPM. Once we've finished up the work in #19, I'll roll v2.0.0 to a full release.

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

No branches or pull requests

2 participants