diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 25739cc9747..a9fe38ead1a 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -1509,16 +1509,26 @@ Contacts={ $.getJSON(OC.filePath('contacts', 'ajax', 'contacts.php'),opts,function(jsondata){ if(jsondata.status == 'success'){ var books = jsondata.data.entries; - $.each(jsondata.data.entries, function(b, book) { + $.each(books, function(b, book) { if($('#contacts h3[data-id="'+b+'"]').length == 0) { firstrun = true; - // TODO: Make sure address books are sorted properly. if($('#contacts h3').length == 0) { $('#contacts').html('