【礼包】获取结束时间时添加判空操作

dev_chengFeng
gaoxin 2021-06-09 12:18:14 +08:00
parent 40768a423d
commit cf878427ef
1 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,7 @@ end
-- 根据类型判断相应的物品是否开启并返回相应的ID
function this.GetActiveGoodsIDByType(goodsType)
for goodsId, endTime in pairs(_GoodsDurationData) do
if rechargeConfig[goodsId].Type == goodsType and endTime > GetTimeStamp() then
if rechargeConfig[goodsId] and rechargeConfig[goodsId].Type == goodsType and endTime > GetTimeStamp() then
return goodsId, endTime
end
end