chore: use klona to clone project objet
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
kolaente 2023-04-01 15:20:00 +02:00
parent 733f0c1e19
commit 33b8a96bb8
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 2 additions and 3 deletions

View File

@ -1,6 +1,7 @@
import {watch, reactive, shallowReactive, unref, toRefs, readonly, ref, computed} from 'vue'
import {acceptHMRUpdate, defineStore} from 'pinia'
import {useI18n} from 'vue-i18n'
import {klona} from 'klona/lite'
import ProjectService from '@/services/project'
import {setModuleLoading} from '@/stores/helper'
@ -144,9 +145,7 @@ export const useProjectStore = defineStore('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 {
...project,
}
return klona(project)
} catch (e) {
// Reset the project state to the initial one to avoid confusion for the user
setProject({