bugfix if there is no address edit of resourceItem was not possible

This commit is contained in:
Julie Lenaerts 2022-02-16 13:51:51 +01:00
parent 12412e05a7
commit 8347ddd5be

View File

@ -170,7 +170,7 @@ export default {
body.name = payload.data.text;
body.email = payload.data.email;
body.telephone = payload.data.phonenumber;
body.address = { id: payload.data.address.address_id };
body.address = payload.data.address ? { id: payload.data.address.address_id } : null;
makeFetch('PATCH', `/api/1.0/thirdparty/thirdparty/${payload.data.id}.json`, body)
.then(response => {