Browse Source

fix: connection removed when a block is dropped in a block output

Ahmad Kholid 3 years ago
parent
commit
404fe50bda

+ 3 - 0
src/background/workflowEngine/helper.js

@@ -56,6 +56,9 @@ export function convertData(data, type) {
     case 'array':
       result = Array.from(data);
       break;
+    case 'string':
+      result = String(data);
+      break;
     default:
   }
 

+ 0 - 13
src/components/newtab/workflow/WorkflowBuilder.vue

@@ -297,19 +297,6 @@ export default {
           .closest('.drawflow-node')
           .id.replace(/node-/, '');
         const outputClass = target.classList[1];
-        const blockData = editor.value.getNodeFromId(targetBlockId);
-        const { connections } = blockData.outputs[outputClass];
-
-        if (connections[0]) {
-          const { output, node } = connections[0];
-
-          editor.value.removeSingleConnection(
-            targetBlockId,
-            node,
-            outputClass,
-            output
-          );
-        }
 
         editor.value.addConnection(
           targetBlockId,

+ 1 - 1
src/locales/en/newtab.json

@@ -193,7 +193,7 @@
       "executedBlockOnWeb": "Show executed block on web page",
       "defaultColumn": {
         "title": "Insert into the default column",
-        "description": "Insert data to the default column when there's no column selected in the block",
+        "description": "Insert data to the default column if there's no column selected in the block",
         "name": "Default column name"
       },
       "autocomplete": {