perf: update deepCopy (#4364)

* perf: update deepCopy

* fix: using deepCopy in core and cli packages

* fix: using deepCopy in editor

* chore: formatting

* fix: some micro optimisation in deepCopy
This commit is contained in:
Csaba Tuncsik
2022-10-18 13:33:31 +02:00
committed by GitHub
parent 638d6f60d3
commit 1aa21ed3df
14 changed files with 101 additions and 27 deletions

View File

@@ -31,6 +31,7 @@ import {
IExecuteData,
INodeConnection,
IWebhookDescription,
deepCopy,
} from 'n8n-workflow';
import {
@@ -361,8 +362,8 @@ export const workflowHelpers = mixins(
cachedWorkflow = new Workflow({
id: workflowId,
name: workflowName,
nodes: copyData ? JSON.parse(JSON.stringify(nodes)) : nodes,
connections: copyData? JSON.parse(JSON.stringify(connections)): connections,
nodes: copyData ? deepCopy(nodes) : nodes,
connections: copyData? deepCopy(connections): connections,
active: false,
nodeTypes,
settings: this.$store.getters.workflowSettings,