Skip to content

Commit

Permalink
Fix crash in MoneyRequestConfirmationList
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Jun 6, 2024
1 parent ca986a7 commit c3d8f36
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/MoneyRequestConfirmationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? {};

Expand Down

0 comments on commit c3d8f36

Please sign in to comment.