Commit acdaca24dbb3a94fced8349424d4e6257fee58ff
1 parent
06562145
获取宝藏关卡时,处理返回值是nil的情况
Showing
2 changed files
with
1 additions
and
2 deletions
Show diff stats
src/actions/HangAction.lua
... | ... | @@ -127,7 +127,7 @@ local function checkReward(role, isTreasure) |
127 | 127 | |
128 | 128 | --挂机得到的宝藏加入到挂机奖励 |
129 | 129 | if isTreasure or false == true then |
130 | - local treasureList= role.dailyData:checkTreasureList(hangInfo.carbonId) | |
130 | + local treasureList= role.dailyData:checkTreasureList(hangInfo.carbonId) or {} | |
131 | 131 | if next(treasureList) ~= nil then |
132 | 132 | for id, val in pairs(treasureList) do |
133 | 133 | local award = val.award:toNumMap() | ... | ... |
src/models/RoleBattle.lua