Fixed: [vue][add-address] fix map center when editing existing address (corrections post review)

52512e45fc (note_1205935758)
This commit is contained in:
Mathieu Jaumotte 2022-12-13 11:45:32 +01:00 committed by Julien Fastré
parent 6a14c2b9b3
commit ce17f5f5c0
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
2 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ export default {
},
},
mounted() {
if (this.value.point) {
if (typeof this.value.point !== 'undefined') {
this.updateMapCenter(this.value.point);
}
},

View File

@ -104,7 +104,7 @@ export default {
this.entity.selected.postcode.name = this.value.name;
this.entity.selected.postcode.code = this.value.code;
this.$emit('getReferenceAddresses', this.value);
if (this.value.center) {
if (typeof this.value.center !== 'undefined') {
this.updateMapCenter(this.value.center);
if (this.value.center.coordinates) {
this.entity.selected.postcode.coordinates = this.value.center.coordinates;