From cafaebfefd20ad621dc801a4b7403c7fea1e782a Mon Sep 17 00:00:00 2001 From: kuangshen04 <2832899707@qq.com> Date: Thu, 2 May 2024 20:26:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=3F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/library/element/character.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/noname/library/element/character.js b/noname/library/element/character.js index 86566ae0f..cd9b9eba8 100644 --- a/noname/library/element/character.js +++ b/noname/library/element/character.js @@ -200,7 +200,11 @@ export class Character { clans = []; for (let i = 0; i < trash.length; i++) { const item = trash[i]; - if (i === 0 && (lib.group.includes(item) || item === 'key')) { + if (typeof item !== "string") { + keptTrashes.push(item); + continue; + } + if (i === 0 && (lib.group.includes(item) || item === "key")) { this.groupInGuozhan = item; } else if (item === "zhu") { this.isZhugong = true; @@ -232,17 +236,17 @@ export class Character { this.isSpecialInStoneMode = true; } else if (item === "hiddenSkill") { this.hasHiddenSkill = true; - } else if (item?.startsWith("border:")) { + } else if (item.startsWith("border:")) { this.groupBorder = item.slice(7); - } else if (item?.startsWith("dualside:")) { + } else if (item.startsWith("dualside:")) { this.dualSideCharacter = item.slice(9); - } else if (item?.startsWith("gzgroup:")) { + } else if (item.startsWith("gzgroup:")) { this.groupInGuozhan = item.slice(8); - } else if (item?.startsWith("doublegroup:")) { + } else if (item.startsWith("doublegroup:")) { this.doubleGroup = item.slice(12).split(":"); - } else if (item?.startsWith("clan:")) { + } else if (item.startsWith("clan:")) { clans.push(item.slice(5)); - } else if (item?.startsWith("InitFilter:")) { + } else if (item.startsWith("InitFilter:")) { this.initFilters = item.slice(11).split(":"); } else { keptTrashes.push(item);