Rename also expressions on pasted nodes and fix unique naming

issue
This commit is contained in:
Jan Oberhauser
2019-08-09 18:47:33 +02:00
parent b5b959fe08
commit fcb0982401
2 changed files with 63 additions and 37 deletions

View File

@@ -1,6 +1,7 @@
import { PLACEHOLDER_EMPTY_WORKFLOW_ID } from '@/constants';
import {
IConnections,
INode,
INodeExecutionData,
INodeIssues,
@@ -166,9 +167,9 @@ export const workflowHelpers = mixins(
},
// Returns a workflow instance.
getWorkflow (copyData?: boolean): Workflow {
const nodes = this.getNodes();
const connections = this.$store.getters.allConnections;
getWorkflow (nodes?: INodeUi[], connections?: IConnections, copyData?: boolean): Workflow {
nodes = nodes || this.getNodes();
connections = connections || (this.$store.getters.allConnections as IConnections);
const nodeTypes: INodeTypes = {
nodeTypes: {},