Skip to content

Commit

Permalink
Merge pull request #47956 from Krishna2323/krishna2323/issue/46998
Browse files Browse the repository at this point in the history
fix: Dupe detection - Merchant field shows (none) instead of blank when (none) is selected.
  • Loading branch information
Beamanator authored Sep 9, 2024
2 parents aaa60b9 + 987ea38 commit d3c995a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ReportActionItem/MoneyRequestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ function MoneyRequestView({
}
return TransactionUtils.getDescription(updatedTransaction ?? null);
}, [updatedTransaction]);
const isEmptyUpdatedMerchant = updatedTransaction?.modifiedMerchant === '' || updatedTransaction?.modifiedMerchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT;
const updatedMerchantTitle = isEmptyUpdatedMerchant ? '' : updatedTransaction?.modifiedMerchant ?? merchantTitle;

const saveBillable = useCallback(
(newBillable: boolean) => {
Expand Down Expand Up @@ -562,7 +564,7 @@ function MoneyRequestView({
<OfflineWithFeedback pendingAction={getPendingFieldAction('merchant')}>
<MenuItemWithTopDescription
description={translate('common.merchant')}
title={updatedTransaction?.modifiedMerchant ?? merchantTitle}
title={updatedMerchantTitle}
interactive={canEditMerchant}
shouldShowRightIcon={canEditMerchant}
titleStyle={styles.flex1}
Expand Down

0 comments on commit d3c995a

Please sign in to comment.