From 4972c2638535722b2b1e470e0002d6d833ffd68b Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Wed, 5 Jun 2024 23:21:33 +0200 Subject: [PATCH] Removed resetSkeleton call Same logic from commit b71f7745a41725c92920a230351854fe17a44a4b, as this would remove useful data from the skeleton used to splice / change the client side data --- components/calendar/form/DeleteEvent.vue | 4 ++-- components/calendar/form/UpdateEvent.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/calendar/form/DeleteEvent.vue b/components/calendar/form/DeleteEvent.vue index 0892603..97a2f59 100644 --- a/components/calendar/form/DeleteEvent.vue +++ b/components/calendar/form/DeleteEvent.vue @@ -12,8 +12,6 @@ const formErrors = reactive<{ message: string | null }>({ watch(isDeleteEventModalOpen, (hasOpened, _o) => { if (hasOpened && lastActiveEvent.value) { eventSkeleton.value = { ...lastActiveEvent.value } - } else { - resetSkeleton() } }) @@ -26,6 +24,8 @@ async function handleAction() { if (err instanceof Error) { formErrors.message = err.message } + } finally { + resetSkeleton() } } diff --git a/components/calendar/form/UpdateEvent.vue b/components/calendar/form/UpdateEvent.vue index 03f3f7d..08d5d28 100644 --- a/components/calendar/form/UpdateEvent.vue +++ b/components/calendar/form/UpdateEvent.vue @@ -15,8 +15,6 @@ const formErrors = reactive<{ message: string | null }>({ watch(isEditEventModalOpen, (hasOpened, _o) => { if (hasOpened && lastActiveEvent.value) { eventSkeleton.value = { ...lastActiveEvent.value } - } else { - resetSkeleton() } }) @@ -29,6 +27,8 @@ async function handleAction() { if (err instanceof Error) { formErrors.message = err.message } + } finally { + resetSkeleton() } }