1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-11-29 11:24:11 +01:00

Make sure address book ids are strings

This commit is contained in:
Thomas Tanghus 2014-02-05 05:20:25 +01:00
parent 0b6cd04a3b
commit a9000d5ad6

View File

@ -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
}