fix: store copy of workflow in workflowsById to prevent node data bugs (#4637)

This commit is contained in:
Alex Grozav
2022-11-17 17:35:28 +02:00
committed by GitHub
parent dea67ca6b7
commit 9cadaea3a4
2 changed files with 6 additions and 15 deletions

View File

@@ -24,6 +24,7 @@ import {
} from "@/Interface";
import {defineStore} from "pinia";
import {
deepCopy,
IConnection,
IConnections,
IDataObject,
@@ -334,7 +335,10 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
},
addWorkflow(workflow: IWorkflowDb) : void {
Vue.set(this.workflowsById, workflow.id, workflow);
Vue.set(this.workflowsById, workflow.id, {
...this.workflowsById[workflow.id],
...deepCopy(workflow),
});
},
setWorkflowActive(workflowId: string): void {