From 714cbd57595f66d06e1e959f95d2f97b02af9112 Mon Sep 17 00:00:00 2001 From: hyb1996 <946994919@qq.com> Date: Thu, 15 Mar 2018 16:48:24 +0800 Subject: [PATCH] fix: engines.exec*** reports error --- autojs/src/main/assets/modules/__engines__.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autojs/src/main/assets/modules/__engines__.js b/autojs/src/main/assets/modules/__engines__.js index feb637ae..8a2d68fe 100644 --- a/autojs/src/main/assets/modules/__engines__.js +++ b/autojs/src/main/assets/modules/__engines__.js @@ -28,12 +28,12 @@ module.exports = function(__runtime__, scope){ c = c || {}; c.path = c.path || files.cwd(); if(c.path){ - if(typeof(c.path) == "string"){ - config.requirePath([c.path]); - config.executePath(c.path); - }else{ + if(Array.isArray(c.path)){ config.requirePath(c.path); config.executePath(c.path[0]); + }else{ + config.requirePath([c.path]); + config.executePath(c.path); } } c.delay = c.delay || 0;