diff --git a/game-server/app/services/donateService.ts b/game-server/app/services/donateService.ts index 23ad848db..82addb72c 100644 --- a/game-server/app/services/donateService.ts +++ b/game-server/app/services/donateService.ts @@ -81,8 +81,8 @@ export function changeReceiveBoxIdByLvAndIndex(receiveBoxs: number[], donationLv // 获取已领取箱子的index let { index } = getArmyDonateBoxBaseById(boxId); // 获取donationLv等级,第index个箱子的id - let { id } = getArmyDonateBoxBaseByLvAndIndex(donationLv, index); - haveGotBoxIds.push(id); + let donateInfo = getArmyDonateBoxBaseByLvAndIndex(donationLv, index); + haveGotBoxIds.push(donateInfo ? donateInfo.id : 0); }); return haveGotBoxIds; } \ No newline at end of file