From 16ca5a1f067fcae527284b853e004e74a998705a Mon Sep 17 00:00:00 2001 From: ccbikai Date: Sat, 8 Feb 2025 20:22:21 +0800 Subject: [PATCH] fix: correct link creation event emission Differentiates between 'edit' and 'create' events in link editor. Updates the emit event to properly handle new link creation scenarios. --- components/dashboard/links/Editor.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dashboard/links/Editor.vue b/components/dashboard/links/Editor.vue index 6969a44..d21912e 100644 --- a/components/dashboard/links/Editor.vue +++ b/components/dashboard/links/Editor.vue @@ -114,7 +114,7 @@ async function onSubmit(formData) { body: link, }) dialogOpen.value = false - emit('update:link', newLink, 'edit') + emit('update:link', newLink, isEdit ? 'edit' : 'create') if (isEdit) { toast('Link updated successfully') }