From 2c8b64e51c91f6babc51fef4bd5c62881be4047d Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 14 Apr 2024 01:10:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=8B=E6=98=8E=E5=B1=B1bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/clan.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/character/clan.js b/character/clan.js index edb46f12f..162d0e1f1 100644 --- a/character/clan.js +++ b/character/clan.js @@ -189,9 +189,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(get.event().dying) return get.attitude(player, get.event().dying); if(get.event().type!='phase') return 1; const names=get.event(`clanshengmo_${player.playerid}_enabled_names`); - return names.some(name=>{ - return player.getUseValue({name})>0; - }); + if(Array.isArray(names)){ + return names.some(name=>{ + return player.getUseValue({name})>0; + }); + } + return 0; } } }