From a9000d5ad6aaa6d7877924cfca50e6a8a1a4b37e Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Wed, 5 Feb 2014 05:20:25 +0100 Subject: [PATCH] Make sure address book ids are strings --- js/addressbooks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/addressbooks.js b/js/addressbooks.js index 66facb90..f5ed7696 100644 --- a/js/addressbooks.js +++ b/js/addressbooks.js @@ -106,7 +106,7 @@ OC.Contacts = OC.Contacts || {}; }; AddressBook.prototype.getId = function() { - return this.book.id; + return String(this.book.id); }; AddressBook.prototype.getBackend = function() { @@ -475,7 +475,7 @@ OC.Contacts = OC.Contacts || {}; console.log('AddressBookList.find', info); var addressBook = null; $.each(this.addressBooks, function(idx, book) { - if(book.getId() === info.id && book.getBackend() === info.backend) { + if(book.getId() === String(info.id) && book.getBackend() === info.backend) { addressBook = book; return false; // break loop }