fix: return updated project instead of the old one
This commit is contained in:
parent
bbaddb9406
commit
4ab547810c
@ -111,12 +111,12 @@ export const useProjectStore = defineStore('project', () => {
|
||||
const projectService = new ProjectService()
|
||||
|
||||
try {
|
||||
await projectService.update(project)
|
||||
const updatedProject = await projectService.update(project)
|
||||
setProject(project)
|
||||
|
||||
// the returned project from projectService.update is the same!
|
||||
// in order to not create a manipulation in pinia store we have to create a new copy
|
||||
return klona(project)
|
||||
return updatedProject
|
||||
} catch (e) {
|
||||
// Reset the project state to the initial one to avoid confusion for the user
|
||||
setProject({
|
||||
|
Loading…
x
Reference in New Issue
Block a user