-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
getNumber() returns an empty string. #1693
Comments
This can happen if the utilsScript is not loading properly - can you check in your browser dev tools, network tab, to see if the utils.js script is loading successfully, before you try typing something in the input? |
Yes, it's not loading, i can't see it in network panel |
Hmm well there should at least be a failed request there, if you've initialised the plugin with the utilsScript option? Try refreshing the page with the devtools network tab open. |
There is no request either, in below code i write the utilsScript if thats what you're asking about initializing.
|
Ah, this will be the problem. You have passed a relative path to the utilsScript option, which wont work. Instead it requires a full URL that will load your hosted utils.js. The easiest thing to do here is just to load it from a CDN, e.g. pass "https://cdn.jsdelivr.net/npm/[email protected]/build/js/utils.js" |
Ok it's working now thank you so much. |
Plugin version
v23.1.1
Steps to reproduce
Expected behaviour
getNumber() function should return the number in international format
Actual behaviour
getNumber() function returns an empty string
Initialisation options
Using 'utilsScript'
Styles and Scripts
Codes
getSelectedCountry() function works fine, it returns the "SelectedCountryData"
The text was updated successfully, but these errors were encountered: