diff --git a/game-server/app/services/normalBattleService.ts b/game-server/app/services/normalBattleService.ts index 167ed77e2..d66476124 100644 --- a/game-server/app/services/normalBattleService.ts +++ b/game-server/app/services/normalBattleService.ts @@ -122,7 +122,8 @@ export function calculateWarStar(warStar: WarStar[] = [], battleId: number, star let hasFound = false; for(let curWarStar of warStar) { if(curWarStar.id == battleId) { - newStars = uniq([...stars, ...curWarStar.stars]); + let oldStars = curWarStar.stars||[]; + newStars = uniq([...stars, ...oldStars]); newStar = newStars.filter(cur => cur > 0).length; newWarStars.push({...curWarStar, star: newStar, stars: newStars}); hasFound = true;