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

Call callback also on failure

This commit is contained in:
Thomas Tanghus 2014-04-26 00:40:04 +02:00
parent c5f4713915
commit a2af42fcab

View File

@ -857,6 +857,10 @@ OC.Contacts = OC.Contacts || {};
cb({id:self.id});
}
}
}).fail(function(response) {
if(typeof cb === 'function') {
cb(response);
}
});
};
@ -2326,6 +2330,8 @@ OC.Contacts = OC.Contacts || {};
self.insertContact(self.contacts[result.id].getListItemElement());
}
});
} else {
console.warn(response);
}
});
});