From ce17f5f5c00bbc75145abf272146b87dc11ebb1e Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Tue, 13 Dec 2022 11:45:32 +0100 Subject: [PATCH] Fixed: [vue][add-address] fix map center when editing existing address (corrections post review) https://gitlab.com/Chill-Projet/chill-bundles/-/commit/52512e45fcb0c02c011f8f7bf3f0aa38c18da52c#note_1205935758 --- .../vuejs/Address/components/AddAddress/AddressSelection.vue | 2 +- .../vuejs/Address/components/AddAddress/CitySelection.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue index bc5adbc89..f1cac5254 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue @@ -99,7 +99,7 @@ export default { }, }, mounted() { - if (this.value.point) { + if (typeof this.value.point !== 'undefined') { this.updateMapCenter(this.value.point); } }, diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue index 292b0de16..ca10285d1 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue @@ -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;