Skip to content

Commit

Permalink
Make getRateByCustomUnitRateID inline
Browse files Browse the repository at this point in the history
  • Loading branch information
paultsimura committed Nov 10, 2024
1 parent fc1c35a commit dc00990
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libs/DistanceRequestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,7 @@ function getUpdatedDistanceUnit({transaction, policy, policyDraft}: {transaction
* If not found, return undefined.
*/
function getRateByCustomUnitRateID({customUnitRateID, policy}: {customUnitRateID: string; policy: OnyxEntry<Policy>}): MileageRate | undefined {
const mileageRates = getMileageRates(policy, true, customUnitRateID);
return mileageRates[customUnitRateID];
return getMileageRates(policy, true, customUnitRateID)[customUnitRateID];
}

export default {
Expand Down

0 comments on commit dc00990

Please sign in to comment.