diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2015-11-07 17:14:29 +0100 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2015-11-07 17:14:29 +0100 |
commit | 262e9218cbbc8cef1539c0a20b774d7aa3871b32 (patch) | |
tree | b861de2b739af48ef6a61058873f305a62aa6511 /js/services/addressBook_service.js | |
parent | 98cee330babd893531ee5cf0ab1a26ae712a1cb9 (diff) |
fix find function being in array
Diffstat (limited to 'js/services/addressBook_service.js')
-rw-r--r-- | js/services/addressBook_service.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/js/services/addressBook_service.js b/js/services/addressBook_service.js index 5ea3669a..47aae658 100644 --- a/js/services/addressBook_service.js +++ b/js/services/addressBook_service.js @@ -21,12 +21,14 @@ app.service('AddressBookService', ['DavClient', 'DavService', 'AddressBook', 'Co // parse contacts addressBook.contacts = []; for(var i in addressBook.objects) { - addressBook.contacts.push( - new Contact(addressBook.objects[i]) - ); + if(typeof addressBook.objects[i] === 'object') { + addressBook.contacts.push( + new Contact(addressBook.objects[i]) + ); + } } return addressBook; }); }; -}]);
\ No newline at end of file +}]); |