🐞 fix(名将擂台): 修复初次挑战对手失败时报错的问题
TypeError: Cannot destructure property 'battleGoods' of '(intermediate value)' as it is null
This commit is contained in:
@@ -344,7 +344,7 @@ async function refreshOpp(ladderMatch: LadderMatchType, needRefresh: boolean) {
|
||||
|
||||
export async function ladderBattleEndReward(roleId: string, roleName: string, sid: string, rank: number, isSuccess: boolean, historyRank: number, num: number) {
|
||||
let dicLadderDifficultRatio = gameData.ladderDifficultRatio.get(rank);
|
||||
if(!dicLadderDifficultRatio) return null;
|
||||
if(!dicLadderDifficultRatio) return { battleGoods: [], breakGoods: [] };
|
||||
let warReward = new WarReward(roleId, roleName, sid, dicLadderDifficultRatio.gkId, isSuccess);
|
||||
warReward.setLadderReward(dicLadderDifficultRatio.randomWinReward, true);
|
||||
warReward.setLadderReward(dicLadderDifficultRatio.randomFailReward, false);
|
||||
|
||||
Reference in New Issue
Block a user