Bug 801615 - Edited contacts can't be saved if address book has lists r=neil a=Callek for CLOSED TREE
authorIan Neal <iann_cvs@blueyonder.co.uk>
Tue, 16 Oct 2012 21:20:53 +0100
changeset 13484 e9a98a948e7e62ebaa3716c80129b8f318faea86
parent 13483 ea5e36651e5e0942e6f243258053b1a2c51092c5
child 13485 f61e19db723659e1bc0aa684114dd87308f1773a
push id714
push useriann_cvs@blueyonder.co.uk
push dateTue, 16 Oct 2012 20:21:04 +0000
treeherdercomm-beta@e9a98a948e7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersneil, Callek
bugs801615
Bug 801615 - Edited contacts can't be saved if address book has lists r=neil a=Callek for CLOSED TREE
suite/mailnews/addrbook/abCardOverlay.js
--- a/suite/mailnews/addrbook/abCardOverlay.js
+++ b/suite/mailnews/addrbook/abCardOverlay.js
@@ -178,22 +178,22 @@ function EditCardOKButton()
   for (let i = 0; i < listDirectoriesCount; i++)
   {
     var subdirectory = directory.addressLists.queryElementAt(i, Components.interfaces.nsIAbDirectory);
     if (subdirectory.isMailList)
     {
       // See if any card in this list is the one we edited.
       // Must compare card contents using .equals() instead of .indexOf()
       // because gEditCard is not really a member of the .addressLists array.
-      let listCardsCount = subdir.addressLists.length;
+      let listCardsCount = subdirectory.addressLists.length;
       for (let index = 0; index < listCardsCount; index++)
       {
         let card = subdirectory.addressLists.queryElementAt(index, Components.interfaces.nsIAbCard);
         if (card.equals(gEditCard.card))
-          foundDirectories.push({directory:subdir, cardIndex:index});
+          foundDirectories.push({directory:subdirectory, cardIndex:index});
       }
     }
   }
  
   CheckAndSetCardValues(gEditCard.card, document, false);
 
   directory.modifyCard(gEditCard.card);