From 55e912221be4b4765cdb3a7bd0e3dc693478ac81 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 1 Apr 2023 15:20:00 +0200 Subject: [PATCH] chore: use klona to clone project objet --- src/stores/projects.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/stores/projects.ts b/src/stores/projects.ts index 0f31f3601..caec75e84 100644 --- a/src/stores/projects.ts +++ b/src/stores/projects.ts @@ -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({