diff --git a/browser/extensions/formautofill/ProfileStorage.jsm b/browser/extensions/formautofill/ProfileStorage.jsm index 1946b0a5213d..51fb2ac99e60 100644 --- a/browser/extensions/formautofill/ProfileStorage.jsm +++ b/browser/extensions/formautofill/ProfileStorage.jsm @@ -1341,7 +1341,7 @@ class Addresses extends AutofillRecords { } let tel = PhoneNumber.Parse(number, region); - if (tel) { + if (tel && tel.internationalNumber) { // Force to save numbers in E.164 format if parse success. address.tel = tel.internationalNumber; } else if (!address.tel) { diff --git a/browser/extensions/formautofill/test/unit/test_transformFields.js b/browser/extensions/formautofill/test/unit/test_transformFields.js index f79800974485..fb58899ee5bb 100644 --- a/browser/extensions/formautofill/test/unit/test_transformFields.js +++ b/browser/extensions/formautofill/test/unit/test_transformFields.js @@ -390,6 +390,15 @@ const ADDRESS_NORMALIZE_TESTCASES = [ "tel": "12345", }, }, + { + description: "Has a valid tel-local format \"tel\"", + address: { + "tel": "1234567", + }, + expectedResult: { + "tel": "1234567", + }, + }, { description: "Has \"tel-national\" and \"tel-country-code\"", address: {