quick fix: address: only add coordinates to selected postcode if coordinates exist

This commit is contained in:
nobohan 2022-06-23 15:46:17 +02:00
parent 10095343ec
commit 07f4aaa590

View File

@ -121,7 +121,9 @@ export default {
this.entity.selected.city = value;
this.entity.selected.postcode.name = value.name;
this.entity.selected.postcode.code = value.code;
this.entity.selected.postcode.coordinates = value.center.coordinates;
if (value.center) {
this.entity.selected.postcode.coordinates = value.center.coordinates;
}
this.entity.selected.writeNew.postcode = false;
this.$emit('getReferenceAddresses', value);
this.focusOnAddress();