diff --git a/src/api_s2c/event/pobinglibao/ApiReceive.ts b/src/api_s2c/event/pobinglibao/ApiReceive.ts index 40fe868..1f60117 100644 --- a/src/api_s2c/event/pobinglibao/ApiReceive.ts +++ b/src/api_s2c/event/pobinglibao/ApiReceive.ts @@ -18,7 +18,7 @@ export default async function (call: ApiCall) { // 取奖励列表,判断是否有可领取奖励 let data = await G.mongodb.cEvent('pobinglibao').findOne({uid: call.uid, type: 'pobinglibao'}) - let rec = data?.record?.[call.req.id].length + let rec = data?.record?.[call.req.id]?.length if (rec && (rec >= 3 || data?.record?.[gift.id] == call.req.recId)) return call.errorCode(-3) await PlayerFun.sendPrize(call, gift[call.req.recId]);