From c3d8f363502c6eb9cccfdc89125ba7fd0fc08a69 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 6 Jun 2024 12:51:52 -0700 Subject: [PATCH] Fix crash in MoneyRequestConfirmationList --- src/components/MoneyRequestConfirmationList.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/MoneyRequestConfirmationList.tsx b/src/components/MoneyRequestConfirmationList.tsx index 6e8c2c9990e2..b7cc0741a152 100755 --- a/src/components/MoneyRequestConfirmationList.tsx +++ b/src/components/MoneyRequestConfirmationList.tsx @@ -255,9 +255,7 @@ function MoneyRequestConfirmationList({ const policyCurrency = policy?.outputCurrency ?? PolicyUtils.getPersonalPolicy()?.outputCurrency ?? CONST.CURRENCY.USD; - const mileageRate = TransactionUtils.isCustomUnitRateIDForP2P(transaction) - ? DistanceRequestUtils.getRateForP2P(policyCurrency) - : mileageRates?.[customUnitRateID] ?? DistanceRequestUtils.getDefaultMileageRate(policy); + const mileageRate = TransactionUtils.isCustomUnitRateIDForP2P(transaction) ? DistanceRequestUtils.getRateForP2P(policyCurrency) : mileageRates?.[customUnitRateID] ?? defaultMileageRate; const {unit, rate} = mileageRate ?? {};