战力:修复bug

This commit is contained in:
luying
2022-03-31 10:15:50 +08:00
parent af8cb4ec94
commit 134c654115
6 changed files with 8 additions and 7 deletions

View File

@@ -305,8 +305,8 @@ export default class GMUsers extends Service {
}
let list = heroes.map(cur => {
let roleCe = roleMap.get(cur.roleId);
let obj = roleCe.attributes.find(ccur => ccur.hid == cur.hid);
return {...cur, calculatedAttr: obj.attrs, env: ctx.app.config.realEnv}
let obj = roleCe?.attributes?.find(ccur => ccur.hid == cur.hid);
return {...cur, calculatedAttr: obj?.attrs||[], env: ctx.app.config.realEnv}
})
return ctx.service.utils.resResult(STATUS.SUCCESS, { list, total })