Browse Source

update phonenumberutil.js file

mandlil_fix_formatting
mandlil 4 weeks ago
committed by GitHub
parent
commit
97ecea6769
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      javascript/i18n/phonenumbers/phonenumberutil.js

+ 1
- 1
javascript/i18n/phonenumbers/phonenumberutil.js View File

@ -1790,7 +1790,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.format =
if (rawInput.length > 0 && number.hasCountryCode()
&& number.getCountryCodeSource() == i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_DEFAULT_COUNTRY
&& numberFormat == i18n.phonenumbers.PhoneNumberFormat.E164) {
const countryCallingCode = number.getCountryCode();
const countryCallingCode = number.getCountryCodeOrDefault();
let formattedNumber =rawInput;
return this.prefixNumberWithCountryCallingCode_(countryCallingCode, numberFormat, formattedNumber,'');
} else if (rawInput.length > 0 || !number.hasCountryCode()) {


Loading…
Cancel
Save