fix(project): remove child projects from state when deleting a project
continuous-integration/drone/push Build is failing Details

This commit is contained in:
kolaente 2024-04-07 15:03:18 +02:00
parent 8bee5aa806
commit 7acd1a7e51
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 6 additions and 0 deletions

View File

@ -106,6 +106,12 @@ export const useProjectStore = defineStore('project', () => {
}
function removeProjectById(project: IProject) {
// Remove child projects from state as well
projectsArray.value
.filter(p => p.parentProjectId === project.id)
.forEach(p => removeProjectById(p))
remove(project)
delete projects.value[project.id]
}