diff --git a/client/src/components/Workflow/Editor/Index.vue b/client/src/components/Workflow/Editor/Index.vue
index 5c6af97a766..8817e61e56a 100644
--- a/client/src/components/Workflow/Editor/Index.vue
+++ b/client/src/components/Workflow/Editor/Index.vue
@@ -249,7 +249,6 @@ export default {
parameters: null,
steps: {},
hasChanges: false,
- nodeIndex: 0,
nodes: {},
datatypesMapper: null,
datatypes: [],
@@ -443,7 +442,7 @@ export default {
this.onNavigate(editUrl);
},
async onClone(node) {
- const newId = this.nodeIndex++;
+ const newId = Object.keys(this.steps).length;
const stepCopy = JSON.parse(JSON.stringify(node.step));
await Vue.set(this.steps, newId, {
...stepCopy,
@@ -628,7 +627,7 @@ export default {
this.isCanvas = true;
return;
}
- Vue.set(this.steps, this.nodeIndex++, {
+ Vue.set(this.steps, Object.keys(this.steps).length, {
name: name,
content_id: contentId,
type: type,
diff --git a/client/src/components/Workflow/Editor/WorkflowConnection.vue b/client/src/components/Workflow/Editor/WorkflowConnection.vue
index ae368b354ad..63e31e002d6 100644
--- a/client/src/components/Workflow/Editor/WorkflowConnection.vue
+++ b/client/src/components/Workflow/Editor/WorkflowConnection.vue
@@ -1,5 +1,5 @@
- {{ connections }}
+ {{ connections }}