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:
parent
c3d30be656
commit
11bdcb2810
@ -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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user