Skip to content
Snippets Groups Projects
Commit 7add36dd authored by Neuber, Eugen Ramon's avatar Neuber, Eugen Ramon :speech_balloon: Committed by Reiter, Christoph
Browse files

Fix api calls with empty person identifier

parent 678569c6
No related branches found
No related tags found
No related merge requests found
......@@ -49,19 +49,21 @@ class PersonProfile extends VPULitElement {
}, {}, that.lang);
break;
case 'value':
const apiUrl = this.entryPointUrl + '/people/' + this.value;
if (this.value !== '') {
const apiUrl = this.entryPointUrl + '/people/' + this.value;
// load person
fetch(apiUrl, {
headers: {
'Content-Type': 'application/ld+json',
'Authorization': 'Bearer ' + window.VPUAuthToken,
},
})
.then(response => response.json())
.then((person) => {
this.person = person;
});
// load person
fetch(apiUrl, {
headers: {
'Content-Type': 'application/ld+json',
'Authorization': 'Bearer ' + window.VPUAuthToken,
},
})
.then(response => response.json())
.then((person) => {
this.person = person;
});
}
break;
default:
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment