diff --git a/frontend/src/components/Modals/SendMail.vue b/frontend/src/components/Modals/SendMail.vue index 9d89896e..a9376cd3 100644 --- a/frontend/src/components/Modals/SendMail.vue +++ b/frontend/src/components/Modals/SendMail.vue @@ -220,8 +220,12 @@ const mail = reactive({ ...emptyMail }) watch(show, () => { if (!show.value) { - mailID.value = null - Object.assign(mail, emptyMail) + if (mailID.value) { + if (isMailEmpty.value) deleteDraftMail.submit() + else updateDraftMail.submit() + mailID.value = null + Object.assign(mail, emptyMail) + } return }