diff --git a/game-server/app/services/comBattleService.ts b/game-server/app/services/comBattleService.ts index a53fa931d..48d959375 100644 --- a/game-server/app/services/comBattleService.ts +++ b/game-server/app/services/comBattleService.ts @@ -183,7 +183,7 @@ export async function getRealReward(blueprtId: number, roleSts: RoleStatus[], ro } } if(hasTimeExtraReward && hasExtraReward) { - let sameGuildCnt = roleSts.filter(cur => cur.guildCode == roleSt.guildCode && cur.roleId != roleSt.roleId).length; + let sameGuildCnt = roleSts.filter(cur => !!roleSt.guildCode && cur.guildCode == roleSt.guildCode && cur.roleId != roleSt.roleId).length; if(sameGuildCnt > 0) { let dicGuildReward = roleSt.isCap? dicReward.captainTimeGuildReward: dicReward.teammateTimeGuildReward; let guildRewards = dicGuildReward.get(sameGuildCnt)||[]