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 { ...@@ -49,19 +49,21 @@ class PersonProfile extends VPULitElement {
}, {}, that.lang); }, {}, that.lang);
break; break;
case 'value': case 'value':
const apiUrl = this.entryPointUrl + '/people/' + this.value; if (this.value !== '') {
const apiUrl = this.entryPointUrl + '/people/' + this.value;
// load person // load person
fetch(apiUrl, { fetch(apiUrl, {
headers: { headers: {
'Content-Type': 'application/ld+json', 'Content-Type': 'application/ld+json',
'Authorization': 'Bearer ' + window.VPUAuthToken, 'Authorization': 'Bearer ' + window.VPUAuthToken,
}, },
}) })
.then(response => response.json()) .then(response => response.json())
.then((person) => { .then((person) => {
this.person = person; this.person = person;
}); });
}
break; break;
default: 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