From b760b53b71efe1cb858477dd447cf2b0851b3fdb Mon Sep 17 00:00:00 2001 From: nkdengineer Date: Thu, 30 May 2024 18:20:52 +0700 Subject: [PATCH] Fix wrong amout is displayed when updating waypoint in offline --- src/libs/actions/IOU.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index 08ce01263a83..ba18fa9d12a0 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -2390,7 +2390,7 @@ function calculateAmountForUpdatedWaypoint( ) { let updatedAmount: number = CONST.IOU.DEFAULT_AMOUNT; let updatedMerchant = Localize.translateLocal('iou.fieldPending'); - if (!isEmptyObject(transactionChanges?.routes)) { + if (!isEmptyObject(transactionChanges?.routes?.route0?.geometry)) { const customUnitRateID = TransactionUtils.getRateID(transaction) ?? ''; const mileageRates = DistanceRequestUtils.getMileageRates(policy); const policyCurrency = policy?.outputCurrency ?? PolicyUtils.getPersonalPolicy()?.outputCurrency ?? CONST.CURRENCY.USD;