diff --git a/frontend/components/cart/delivery/AddressModal.vue b/frontend/components/cart/delivery/AddressModal.vue index d7f763d..3e086da 100644 --- a/frontend/components/cart/delivery/AddressModal.vue +++ b/frontend/components/cart/delivery/AddressModal.vue @@ -134,15 +134,14 @@ const handleSubmit = async () => { }; watch( - () => addressData.value.for_me, - (newValue) => { + () => [addressData.value.for_me, isShow.value], + ([newValue, newValue2]) => { if (!isEditing.value) { - addressData.value.phone = newValue == "بله" ? account.value!.phone : ""; + addressData.value.phone = newValue == "بله" && newValue2 ? account.value?.phone ?? "" : ""; } }, { immediate: true, - deep: true, } ); @@ -178,7 +177,7 @@ watch(