Changeset 0a199f


Ignore:
Timestamp:
Jul 22, 2011, 9:40:41 AM (9 years ago)
Author:
rene <rene@…>
Branches:
ng_0.8, ng_0.9
Children:
ee5fe6
Parents:
88d97a2
Message:

check if query returns a directory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chrome/content/v_identity/vI_storage.js

    r88d97a2 r0a199f  
    335335            let ab = allAddressBooks.getNext();
    336336            if (ab instanceof Components.interfaces.nsIAbDirectory && !ab.isRemote) {
    337                 let cards = abManager.getDirectory(ab.URI +
    338                     "?(and(DisplayName,=," + encodeURIComponent(vI_storage.__getMailListName(recipient)) + ")(IsMailList,=,TRUE))").childCards;
    339                 if (cards.hasMoreElements()) return true;   // only interested if there is at least one element...
     337                let abdirectory = abManager.getDirectory(ab.URI +
     338                    "?(and(DisplayName,=," + encodeURIComponent(vI_storage.__getMailListName(recipient)) + ")(IsMailList,=,TRUE))");
     339                if (abdirectory) {
     340                    let cards = abdirectory.childCards;
     341                    if (cards.hasMoreElements()) return true;   // only interested if there is at least one element...
     342                }
    340343            }
    341344        }
Note: See TracChangeset for help on using the changeset viewer.