diff --git a/Shortcuts/PolicySwitch.js b/Shortcuts/PolicySwitch.js index 46885bf..05c41fa 100644 --- a/Shortcuts/PolicySwitch.js +++ b/Shortcuts/PolicySwitch.js @@ -72,8 +72,12 @@ function nobyda() { }) } if (isLoon) { - const get = JSON.parse($config.getSubPolicys(groupName)); - return get.map(n => n[0].name); + return new Promise((resolve) => { + $config.getSubPolicys(groupName, (b) => { + const get = JSON.parse(b || '[]').map(n => n.name); + resolve(get) + }) + }) } if (isQuanX) { return new Promise((resolve) => {