From 04ecbe1c2b87190a259e48847b63b6fb443128f3 Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Tue, 11 Mar 2025 13:33:44 +0100 Subject: [PATCH] Fixed more clone issues --- components/calendar/dialog/DeleteEvent.vue | 2 +- components/calendar/dialog/UpdateEvent.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/calendar/dialog/DeleteEvent.vue b/components/calendar/dialog/DeleteEvent.vue index 1e02d55..6df0292 100644 --- a/components/calendar/dialog/DeleteEvent.vue +++ b/components/calendar/dialog/DeleteEvent.vue @@ -6,7 +6,7 @@ const isLoading = ref(false) // Watch the popover state watch(isDeleteEventModalOpen, (hasOpened, _o) => { if (hasOpened && lastActiveEvent.value) { - eventSkeleton.value = { ...lastActiveEvent.value } + eventSkeleton.value = structuredClone(toRaw(lastActiveEvent.value)) } }) diff --git a/components/calendar/dialog/UpdateEvent.vue b/components/calendar/dialog/UpdateEvent.vue index ba4d32b..9daefc3 100644 --- a/components/calendar/dialog/UpdateEvent.vue +++ b/components/calendar/dialog/UpdateEvent.vue @@ -5,7 +5,7 @@ const { resetSkeleton } = useCalendar(); // Watch the popover state watch(isEditEventModalOpen, (hasOpened, _o) => { if (hasOpened && lastActiveEvent.value) { - eventSkeleton.value = { ...lastActiveEvent.value } + eventSkeleton.value = structuredClone(toRaw(lastActiveEvent.value)) } })