From 3d65e7201eff06aef8c76a7e52fdb49cd8d27a86 Mon Sep 17 00:00:00 2001 From: AIsouler Date: Thu, 7 Mar 2024 22:46:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=85=A8=E5=B1=80=E8=A7=84=E5=88=99):=20?= =?UTF-8?q?=E5=BC=80=E5=B1=8F=E5=B9=BF=E5=91=8A=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/globalGroups.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/globalGroups.ts b/src/globalGroups.ts index a1beb38d..e122b2dd 100644 --- a/src/globalGroups.ts +++ b/src/globalGroups.ts @@ -59,10 +59,11 @@ const diabledAppIds: string[] = [ // 如果应用规则已有全局规则中的某一类的规则, 则在对应全局规则禁用此应用 function filterAppsByGroup(apps: any[], groupNamePrefix: string): string[] { return apps - .filter((a) => - a.groups.filter((g: { name: string }) => - g.name.startsWith(groupNamePrefix), - ), + .filter( + (a) => + a.groups.filter((g: { name: string }) => + g.name.startsWith(groupNamePrefix), + ).length === 1, ) .map((a) => a.id); }