mirror of https://github.com/nextcloud/contacts
Load valid contact in case an invalid uid is entered in the url
This commit is contained in:
parent
129b1aa4bd
commit
21b97d53a0
|
@ -51,6 +51,10 @@ angular.module('contactsApp')
|
|||
return;
|
||||
}
|
||||
ContactService.getById(uid).then(function(contact) {
|
||||
if (angular.isUndefined(contact)) {
|
||||
ctrl.clearContact();
|
||||
return;
|
||||
}
|
||||
ctrl.contact = contact;
|
||||
ctrl.photo = ctrl.contact.photo();
|
||||
ctrl.show = true;
|
||||
|
|
Loading…
Reference in New Issue