Bug 870148 - Check vality of tel.value when importing contacts. r=gwagner

--HG--
extra : rebase_source : 67889d60976fdd3e709d687981b6923cf350f4a2
This commit is contained in:
Volker Mische 2013-05-14 10:17:37 -07:00
parent 5d06283e78
commit 8e9032d233

View File

@ -454,7 +454,7 @@ ContactDB.prototype = {
if (aContact.properties[field] && contact.search[field]) {
for (let i = 0; i <= aContact.properties[field].length; i++) {
if (aContact.properties[field][i]) {
if (field == "tel") {
if (field == "tel" && aContact.properties[field][i].value) {
let number = aContact.properties.tel[i].value.toString();
let normalized = PhoneNumberUtils.normalize(number);
// We use an object here to avoid duplicates