Skip to content

Commit

Permalink
Merge pull request #26601 from Expensify/vit-26536followup
Browse files Browse the repository at this point in the history
Fix the merchant being overwritten with distance merchant
  • Loading branch information
mountiny authored Sep 3, 2023
2 parents 9661a4b + 89192aa commit 388ddc8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/MoneyRequestConfirmationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,11 @@ function MoneyRequestConfirmationList(props) {
const distanceMerchant = useMemo(() => DistanceRequestUtils.getDistanceMerchant(distance, unit, rate, currency, translate), [distance, unit, rate, currency, translate]);

useEffect(() => {
if (!props.isDistanceRequest) {
return;
}
IOU.setMoneyRequestMerchant(distanceMerchant);
}, [distanceMerchant]);
}, [distanceMerchant, props.isDistanceRequest]);

/**
* @param {Object} option
Expand Down

0 comments on commit 388ddc8

Please sign in to comment.