From dc009901a9950a6a9eb2de5a4b7982640148dfaf Mon Sep 17 00:00:00 2001 From: Pavlo Tsimura Date: Sun, 10 Nov 2024 23:06:25 +0100 Subject: [PATCH] Make getRateByCustomUnitRateID inline --- src/libs/DistanceRequestUtils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libs/DistanceRequestUtils.ts b/src/libs/DistanceRequestUtils.ts index b7e724b21976..3b8e26c9cd33 100644 --- a/src/libs/DistanceRequestUtils.ts +++ b/src/libs/DistanceRequestUtils.ts @@ -369,8 +369,7 @@ function getUpdatedDistanceUnit({transaction, policy, policyDraft}: {transaction * If not found, return undefined. */ function getRateByCustomUnitRateID({customUnitRateID, policy}: {customUnitRateID: string; policy: OnyxEntry}): MileageRate | undefined { - const mileageRates = getMileageRates(policy, true, customUnitRateID); - return mileageRates[customUnitRateID]; + return getMileageRates(policy, true, customUnitRateID)[customUnitRateID]; } export default {