From 1205fc08e319d989fae1c7a3e85080867b305133 Mon Sep 17 00:00:00 2001 From: hyb1996 <946994919@qq.com> Date: Thu, 1 Feb 2018 12:42:20 +0800 Subject: [PATCH] fix #291 --- autojs/src/main/assets/modules/__app__.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/autojs/src/main/assets/modules/__app__.js b/autojs/src/main/assets/modules/__app__.js index 72f0aa43..d4a4ed71 100644 --- a/autojs/src/main/assets/modules/__app__.js +++ b/autojs/src/main/assets/modules/__app__.js @@ -15,8 +15,12 @@ module.exports = function(__runtime__, scope){ } } if (i.category) { - for (var key in i.category) { - intent.addCategory(key, i.category[key]); + if(i.category instanceof Array){ + for(var j = 0; i < i.category.length; j++){ + intent.addCategory(i.category[j]); + } + }else{ + intent.addCategory(i.category); } } if (i.action) {