Quellcode durchsuchen

Merge pull request #1569 from ZaneYork/dev

Fix: can't find block when using js block
Ahmad Kholid vor 1 Jahr
Ursprung
Commit
cbefa9b352
1 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
  1. 3 2
      src/workflowEngine/blocksHandler/handlerJavascriptCode.js

+ 3 - 2
src/workflowEngine/blocksHandler/handlerJavascriptCode.js

@@ -225,8 +225,6 @@ export async function javascriptCode({ outputs, data, ...block }, { refData }) {
 
       if (inputNextBlockId) {
         let customNextBlockId = this.getBlockConnections(inputNextBlockId);
-        if (!customNextBlockId)
-          throw new Error(`Can't find block with "${inputNextBlockId}" id`);
 
         const nextBlock = this.engine.blocks[inputNextBlockId];
         if (!customNextBlockId && nextBlock) {
@@ -239,6 +237,9 @@ export async function javascriptCode({ outputs, data, ...block }, { refData }) {
           ];
         }
 
+        if (!customNextBlockId)
+          throw new Error(`Can't find block with "${inputNextBlockId}" id`);
+
         nextBlockId = customNextBlockId;
       }
     } else {