战力:修复获取属性错误问题

This commit is contained in:
luying
2022-04-06 15:39:01 +08:00
parent 126c51b4dd
commit 0d7b435f1f

View File

@@ -398,7 +398,7 @@ export async function getSumCe(roleId: string, num: number) {
export async function getHeroesAttributes(roleId: string) {
let roleCe = await RoleCeModel.findByRoleId(roleId);
let attrByHid = new Map<number, AttributeCal>();
for(let { hid, attrs } of roleCe.attributes||[]) {
for(let { hid, attrs } of roleCe?.attributes??[]) {
let cal = new AttributeCal();
cal.setLv(roleCe.roleLv);
cal.setByWarJson(attrs);