Browse Source

fix: block not execute

Ahmad Kholid 3 years ago
parent
commit
56237a4b97
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/popup/pages/Recording.vue

+ 8 - 1
src/popup/pages/Recording.vue

@@ -80,7 +80,7 @@ function generateDrawflow(startBlock, startBlockData) {
       pos_y: 300,
       pos_y: 300,
       inputs: {},
       inputs: {},
       outputs: {
       outputs: {
-        [startBlock ? startBlock.output : 'output_1']: {
+        output_1: {
           connections: [{ node: nextNodeId, output: 'input_1' }],
           connections: [{ node: nextNodeId, output: 'input_1' }],
         },
         },
       },
       },
@@ -94,6 +94,13 @@ function generateDrawflow(startBlock, startBlockData) {
     },
     },
   };
   };
 
 
+  if (startBlock) {
+    nodes[triggerId].outputs[startBlock.output]?.connections.push({
+      node: nextNodeId,
+      output: 'input_1',
+    });
+  }
+
   const position = {
   const position = {
     y: startBlockData ? startBlockData.pos_y + 50 : 300,
     y: startBlockData ? startBlockData.pos_y + 50 : 300,
     x: startBlockData ? startBlockData.pos_x + 120 : 260,
     x: startBlockData ? startBlockData.pos_x + 120 : 260,