1
0

fix: rename getParentProjects method to make it clear what it does

This commit is contained in:
kolaente
2023-04-12 11:42:59 +02:00
parent 4ab547810c
commit 39f699a61a
3 changed files with 6 additions and 6 deletions

View File

@ -158,14 +158,14 @@ export const useProjectStore = defineStore('project', () => {
}
}
function getParentProjects(project: IProject): IProject[] {
function getAncestors(project: IProject): IProject[] {
if (!project?.parentProjectId) {
return [project]
}
const parentProject = projects.value[project.parentProjectId]
return [
...getParentProjects(parentProject),
...getAncestors(parentProject),
project,
]
}
@ -190,7 +190,7 @@ export const useProjectStore = defineStore('project', () => {
createProject,
updateProject,
deleteProject,
getParentProjects,
getAncestors,
}
})