寻宝:修复 searchTeam 潜在报错
This commit is contained in:
@@ -4,7 +4,7 @@ import { difference } from 'underscore';
|
|||||||
* @Author: 梁桐川
|
* @Author: 梁桐川
|
||||||
* @Date: 2020-11-30 15:05:48
|
* @Date: 2020-11-30 15:05:48
|
||||||
* @Last Modified by: 梁桐川
|
* @Last Modified by: 梁桐川
|
||||||
* @Last Modified time: 2021-03-10 20:15:30
|
* @Last Modified time: 2021-08-27 17:47:56
|
||||||
*/
|
*/
|
||||||
import { IT_TYPE, CURRENCY_BY_TYPE, CURRENCY_TYPE, COM_TEAM_STATUS, COM_BTL_CONST, CONSUME_TYPE, COM_BTL_QUALITY, MSG_SOURCE, QUALITY_TYPE, ROLE_SELECT, TASK_TYPE, KING_EXP_RATIO_TYPE } from './../../../consts';
|
import { IT_TYPE, CURRENCY_BY_TYPE, CURRENCY_TYPE, COM_TEAM_STATUS, COM_BTL_CONST, CONSUME_TYPE, COM_BTL_QUALITY, MSG_SOURCE, QUALITY_TYPE, ROLE_SELECT, TASK_TYPE, KING_EXP_RATIO_TYPE } from './../../../consts';
|
||||||
import Role, { RoleModel } from '../../../db/Role';
|
import Role, { RoleModel } from '../../../db/Role';
|
||||||
@@ -118,7 +118,7 @@ export class ComBattleHandler {
|
|||||||
|
|
||||||
const teams = await ComBattleTeamModel.getOtherTeamByQualityAndSt(roleId, qualityArr, COM_TEAM_STATUS.DEFAULT, lvRange, topLineupCe);
|
const teams = await ComBattleTeamModel.getOtherTeamByQualityAndSt(roleId, qualityArr, COM_TEAM_STATUS.DEFAULT, lvRange, topLineupCe);
|
||||||
const team: ComBattleTeamType = await oneTeamNotInBlack(teams, roleId);
|
const team: ComBattleTeamType = await oneTeamNotInBlack(teams, roleId);
|
||||||
if (team && team.roleIds.length < 3 && team.status === COM_TEAM_STATUS.DEFAULT && team.roleIds.indexOf(roleId) === -1 && team.blacklist.indexOf(roleId) === -1) {
|
if (team && team.roleIds.length < 3 && team.status === COM_TEAM_STATUS.DEFAULT && team.roleIds.indexOf(roleId) === -1 && team.blacklist && team.blacklist.indexOf(roleId) === -1) {
|
||||||
return resResult(STATUS.SUCCESS, {teamCode: team.teamCode});
|
return resResult(STATUS.SUCCESS, {teamCode: team.teamCode});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user