Closed VasylenkoStanislav closed 3 years ago
You haven't provided a link to Google's demo https://github.com/catamphetamine/libphonenumber-js#bug-reporting
I also encountered same issue, the solution is to use max metadata sets instead of min, you can read about it in docs (tbh, at first I thought that "min" postfix in CDN's url is minified version of script):
https://github.com/catamphetamine/libphonenumber-js#min-vs-max-vs-mobile-vs-core
@gtoroptsev Metadata selection shouldn't influence country detection. I'll check.
@gtoroptsev Or provide an exact example
The originally reported number is recognized as DOminican by Google's library, so there's no bug. https://libphonenumber.appspot.com/phonenumberparser?number=%2B18001646460&country=RU
Steps to reproduce
parsePhoneNumberFromString('+18001646460');
Observed result
This expression return country set to Dominicana countryCallingCode: "1" nationalNumber: "8001646460" number: "+18001646460" country: "DO"
Expected result country: "US"