Bug 784646 - B2G: Cannot import SIM contacts. r=gwagner
authorYoshi Huang <allstars.chh@mozilla.com>
Fri, 28 Sep 2012 01:37:39 +0800
changeset 108486 c637ee14bccdc07c3687eab43a9267f6d642ab8e
parent 108485 5a1faaa874b3220c98760e1c86c9e8add93ebf1d
child 108487 4cf6ad64c3f9916152de2955ba009e3cee1ece33
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersgwagner
bugs784646
milestone18.0a1
Bug 784646 - B2G: Cannot import SIM contacts. r=gwagner
dom/contacts/fallback/ContactService.jsm
--- a/dom/contacts/fallback/ContactService.jsm
+++ b/dom/contacts/fallback/ContactService.jsm
@@ -147,17 +147,17 @@ let DOMContactManager = {
           function() { mm.sendAsyncMessage("Contacts:Clear:Return:OK", { requestID: msg.requestID }); }.bind(this),
           function(aErrorMsg) { mm.sendAsyncMessage("Contacts:Clear:Return:KO", { requestID: msg.requestID, errorMsg: aErrorMsg }); }.bind(this)
         );
         break;
       case "Contacts:GetSimContacts":
         mRIL.getICCContacts(
           msg.options.contactType,
           function (aErrorMsg, aType, aContacts) {
-            if (aErrorMsg) {
+            if (aErrorMsg !== 'undefined') {
               mm.sendAsyncMessage("Contacts:GetSimContacts:Return:KO",
                                   {requestID: msg.requestID,
                                    errorMsg: aErrorMsg});
             } else {
               mm.sendAsyncMessage("Contacts:GetSimContacts:Return:OK",
                                   {requestID: msg.requestID,
                                    contacts: aContacts});
             }