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

Check if contact is valid when removing from group

This commit is contained in:
Thomas Tanghus 2014-03-14 01:22:20 +01:00
parent 90d3a370d5
commit cc28aaf4f9

View File

@ -643,7 +643,10 @@ OC.Contacts = OC.Contacts || {
$.each(result.contacts, function(idx, contactid) { $.each(result.contacts, function(idx, contactid) {
var contact = self.contacts.findById(contactid); var contact = self.contacts.findById(contactid);
contact.removeFromGroup(result.groupname); // Test if valid because there could be stale ids in the tag index.
if(contact) {
contact.removeFromGroup(result.groupname);
}
}); });
}); });