瀏覽代碼

fix: throw error when can't find loop

Ahmad Kholid 2 年之前
父節點
當前提交
fb753f4f23
共有 3 個文件被更改,包括 4 次插入2 次删除
  1. 1 1
      package.json
  2. 2 0
      src/newtab/workflowEngine/blocksHandler/handlerLoopBreakpoint.js
  3. 1 1
      webpack.config.js

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "automa",
-  "version": "1.22.0",
+  "version": "1.21.6",
   "description": "An extension for automating your browser by connecting blocks",
   "repository": {
     "type": "git",

+ 2 - 0
src/newtab/workflowEngine/blocksHandler/handlerLoopBreakpoint.js

@@ -10,6 +10,8 @@ async function loopBreakpoint(block, { prevBlockData }) {
       currentLoop.type === 'numbers'
         ? true
         : currentLoop.index < currentLoop.data.length - 1;
+  } else {
+    throw new Error(`Can't find a loop with "${block.data.loopId}" loop id`);
   }
 
   const notReachMaxLoop =

+ 1 - 1
webpack.config.js

@@ -14,7 +14,7 @@ const ASSET_PATH = process.env.ASSET_PATH || '/';
 const alias = {
   '@': path.resolve(__dirname, 'src/'),
   secrets: path.join(__dirname, 'secrets.blank.js'),
-  '@business': path.resolve(__dirname, 'business/prod'),
+  '@business': path.resolve(__dirname, 'business/dev'),
 };
 
 // load the secrets