From 97ecea6769f2a67aea403aed9e0d8f47d3f9c265 Mon Sep 17 00:00:00 2001 From: mandlil <138015259+mandlil@users.noreply.github.com> Date: Fri, 14 Nov 2025 06:38:34 +0000 Subject: [PATCH] update phonenumberutil.js file --- javascript/i18n/phonenumbers/phonenumberutil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/i18n/phonenumbers/phonenumberutil.js b/javascript/i18n/phonenumbers/phonenumberutil.js index 5153c1517..db90566a4 100644 --- a/javascript/i18n/phonenumbers/phonenumberutil.js +++ b/javascript/i18n/phonenumbers/phonenumberutil.js @@ -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()) {