From aee4fcf1642239cddd8cd4503964c82b41ecccda Mon Sep 17 00:00:00 2001 From: Vick Scarlet Date: Sat, 17 May 2025 21:27:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=86=B2=E7=AA=81?= =?UTF-8?q?=E5=A4=A9=E8=B5=8B=E6=BC=8F=E5=A1=AB=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/talent.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/modules/talent.js b/src/modules/talent.js index 8533a5e..5727bfa 100644 --- a/src/modules/talent.js +++ b/src/modules/talent.js @@ -68,13 +68,17 @@ class Talent { exclude(talents, excludeId) { const { exclude } = this.get(excludeId); - if(!exclude) return null; for(const talent of talents) { - for(const e of exclude) { - if(talent == e) return talent; + if(exclude) { + for(const e of exclude) { + if(talent == e) return talent; + } } - for (const e of this.get(talent).exclude) { - if (excludeId == e) return talent + const excludeReverse = this.get(talent).exclude; + if(excludeReverse) { + for (const e of excludeReverse) { + if (excludeId == e) return talent + } } } return null;