From c1e8bc1915f6a3fb2590e8d30fff8ac0d886758f Mon Sep 17 00:00:00 2001 From: luying Date: Sat, 6 Nov 2021 11:49:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=98=E6=96=97=E7=BB=93=E6=9D=9F=EF=BC=9A?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=88=98=E6=96=97=E6=98=9F=E7=BA=A7=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/normalBattleService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game-server/app/services/normalBattleService.ts b/game-server/app/services/normalBattleService.ts index 254ec56d0..fe0f77b04 100644 --- a/game-server/app/services/normalBattleService.ts +++ b/game-server/app/services/normalBattleService.ts @@ -122,7 +122,7 @@ export function calculateWarStar(warStar: WarStar[] = [], battleId: number, star for(let curWarStar of warStar) { if(curWarStar.id == battleId) { for(let i = 0; i < 3; i++) { - let isOn = (curWarStar.stars[i] == 1)||(stars[i] == 1); + let isOn = (curWarStar.stars && curWarStar.stars[i] == 1)||(stars[i] == 1); newStars.push(isOn? 1: 0); if(isOn) newStar++; }