diff --git a/shared/pubUtils/taskUtil.ts b/shared/pubUtils/taskUtil.ts index c2a27acf4..6716b7c59 100644 --- a/shared/pubUtils/taskUtil.ts +++ b/shared/pubUtils/taskUtil.ts @@ -230,12 +230,12 @@ export async function checkTaskWithEplace(roleId: string, taskType: number, oldE else if (taskType == TASK_TYPE.EQUIP_JEWEL_RANDSE_CNT) { let { oldJewel, newJewel } = getJewelByEquip(oldEquip, newEquip, { jewels: params.jewels }); - let oldRandSe = oldJewel.randSe||[]; + let oldRandSe = oldJewel?.randSe||[]; let oldUnlockSeCnt = oldRandSe.filter(se => { return isRandSeUnLock(oldJewel.id, se.id, oldEquip.stones); }).length; - let newRandSe = newJewel.randSe||[]; + let newRandSe = newJewel?.randSe||[]; let newUnlockSeCnt = newRandSe.filter(se => { return isRandSeUnLock(newJewel.id, se.id, newEquip.stones); }).length; @@ -1492,12 +1492,12 @@ export function isComplete(_roleId: string, taskType: TASK_TYPE, taskParam: stri let { oldEquip, newEquip } = paramObj; let { oldJewel, newJewel } = getJewelByEquip(oldEquip, newEquip, { jewels: paramObj.jewels }); - let oldRandSe = oldJewel.randSe||[]; + let oldRandSe = oldJewel?.randSe||[]; let oldUnlockSeCnt = oldRandSe.filter(se => { return isRandSeUnLock(oldJewel.id, se.id, oldEquip.stones); }).length; - let newRandSe = newJewel.randSe||[]; + let newRandSe = newJewel?.randSe||[]; let newUnlockSeCnt = newRandSe.filter(se => { return isRandSeUnLock(newJewel.id, se.id, newEquip.stones); }).length;