From ab94343d0738d42133f472e5088a79fbe415fe75 Mon Sep 17 00:00:00 2001 From: kolaente Date: Mon, 27 Mar 2023 13:25:23 +0200 Subject: [PATCH] feat(navigation): make dragging a project under another project work --- src/components/home/ProjectsNavigation.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/home/ProjectsNavigation.vue b/src/components/home/ProjectsNavigation.vue index bd9c6baf3..b746efa07 100644 --- a/src/components/home/ProjectsNavigation.vue +++ b/src/components/home/ProjectsNavigation.vue @@ -72,7 +72,7 @@ @@ -151,7 +151,7 @@ async function saveProjectPosition(e: SortableEvent) { projectAfter !== null ? projectAfter.position : null, ) - if (project.parentProjectId !== parentProjectId) { + if (project.parentProjectId !== parentProjectId && project.parentProjectId > 0) { const parentProject = projectStore.getProjectById(project.parentProjectId) const childProjectIndex = parentProject.childProjects.findIndex(p => p.id === project.id) parentProject.childProjects.splice(childProjectIndex, 1)