Browse Source

updated phonenumberutil.js file

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

+ 2
- 3
javascript/i18n/phonenumbers/phonenumberutil.js View File

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


Loading…
Cancel
Save