-
Notifications
You must be signed in to change notification settings - Fork 41
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
formatNational not working for some countries in split versions #23
Comments
Discovered differences in these countries so far. The first line after the country code is the formatted output using
Mostly smaller territories. Perhaps they're dependent on the metadata of a parent territory (e.g. GU Guam)? |
I'm unsure why any of those would be failing. Truth be told I know ~0 about libphonenumber or the build stuff. 😜 It worked as a single-module include for the scenario I needed. If you track down how to fix it I'm all ears, though! |
Sure, I'll let you know what I find out! My hunch is that metadata for countries sharing the same calling code may need to be bundled...notice, for example, that CC and CX fail to format, both of which share calling code 61 with AU. The same happens with this list of countries, all of which share calling code 1 with the US:
|
I think that's it! As soon as I bundled the US metadata with AG, for instance,
I'll submit a PR once I've got it all figured out. |
formatNational
appears to work fine inlibphonenumber.js
(using the latest files indist/
):But when I try those two function calls in the country-split versions, only GB works:
(This is just an initial report...I'll debug further.)
The text was updated successfully, but these errors were encountered: