diff --git a/clash.js b/clash.js index 2fd103e..40f61ee 100644 --- a/clash.js +++ b/clash.js @@ -32,7 +32,11 @@ async function configPrependRules(utils, obj) { // 获取代理组的名称 function getProxyGroupName(obj) { - return obj['proxy-groups'].find(item => item.name.includes('节点选择')).name + const nodeSelectName = obj['proxy-groups'].find(item => item.name.includes('节点选择')) + if (nodeSelectName) { + return nodeSelectName.name + } + return obj['proxy-groups'].find(item => item.name.includes('手动切换')).name } // 获取直连组的名称