1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-02-07 01:54:16 +01:00

Check if 'data' is set before acessing it's properties. Refs #373

This commit is contained in:
Thomas Tanghus 2014-01-26 23:04:02 +01:00
parent c3d30be656
commit 11bdcb2810

View File

@ -95,7 +95,7 @@ OC.Contacts = OC.Contacts || {};
}; };
Contact.prototype.hasPhoto = function() { Contact.prototype.hasPhoto = function() {
return this.data.photo; return (this.data && this.data.photo) || false;
}; };
Contact.prototype.isOpen = function() { Contact.prototype.isOpen = function() {