diff --git a/src/api_s2c/event/pobinglibao/ApiReceive.ts b/src/api_s2c/event/pobinglibao/ApiReceive.ts index a37404f..65ddd8c 100644 --- a/src/api_s2c/event/pobinglibao/ApiReceive.ts +++ b/src/api_s2c/event/pobinglibao/ApiReceive.ts @@ -27,11 +27,12 @@ export default async function (call: ApiCall) { if (!payLog || !payLog.length) continue; for (let key of ["prize", "recPrize1", "recPrize2"]) { - if (data.record[gift.id] && data.record[gift.id].includes(key)) { - push.concat(key); - prize.concat(gift[key]); + if (!data || !data?.record[gift.id] || !data.record[gift.id].includes(key)) { + push.push(key); + prize.push(...gift[key]); } } + if (push.length > 0) { if (update["$push"]) { update["$push"]["record." + gift.id] = { $each: push }