Bug 936309 - [FDN] "Add contact" is broken. r=vicamo

This commit is contained in:
Yoshi Huang 2013-11-11 19:35:06 +08:00
parent 836f4fdce4
commit 30097a69a1

View File

@ -919,7 +919,8 @@ let RIL = {
let contact = options.contact;
let iccid = RIL.iccInfo.iccid;
if (contact.contactId.startsWith(iccid)) {
if (typeof contact.contactId === "string" &&
contact.contactId.startsWith(iccid)) {
let recordIndex = contact.contactId.substring(iccid.length);
contact.pbrIndex = Math.floor(recordIndex / ICC_MAX_LINEAR_FIXED_RECORDS);
contact.recordId = recordIndex % ICC_MAX_LINEAR_FIXED_RECORDS;