From 6b2b384a11ab75a1506575d12497c13c8db911df Mon Sep 17 00:00:00 2001 From: luying Date: Fri, 25 Feb 2022 10:37:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=85=E5=A4=87=EF=BC=9A=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/pubUtils/taskUtil.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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;