From 3c26403fd7583761804d23397883d35bc7d64eb3 Mon Sep 17 00:00:00 2001 From: Robin Munn Date: Tue, 28 May 2024 15:15:51 +0700 Subject: [PATCH] Fix incorrect deleteDraftProject logic --- frontend/src/routes/(authenticated)/admin/AdminProjects.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/routes/(authenticated)/admin/AdminProjects.svelte b/frontend/src/routes/(authenticated)/admin/AdminProjects.svelte index d44be5e4e..4e43952b4 100644 --- a/frontend/src/routes/(authenticated)/admin/AdminProjects.svelte +++ b/frontend/src/routes/(authenticated)/admin/AdminProjects.svelte @@ -60,7 +60,7 @@ let deleteProjectModal: ConfirmDeleteModal; async function deleteProjectOrDraft(project: ProjectItemWithDraftStatus): Promise { - const deleteFn = project.isDraft ? _deleteProject : _deleteDraftProject; + const deleteFn = project.isDraft ? _deleteDraftProject : _deleteProject; const result = await deleteProjectModal.open(project.name, async () => { const { error } = await deleteFn(project.id); return error?.message;