Skip to content

Commit d3c995a

Browse files
authored
Merge pull request #47956 from Krishna2323/krishna2323/issue/46998
fix: Dupe detection - Merchant field shows (none) instead of blank when (none) is selected.
2 parents aaa60b9 + 987ea38 commit d3c995a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/ReportActionItem/MoneyRequestView.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ function MoneyRequestView({
257257
}
258258
return TransactionUtils.getDescription(updatedTransaction ?? null);
259259
}, [updatedTransaction]);
260+
const isEmptyUpdatedMerchant = updatedTransaction?.modifiedMerchant === '' || updatedTransaction?.modifiedMerchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT;
261+
const updatedMerchantTitle = isEmptyUpdatedMerchant ? '' : updatedTransaction?.modifiedMerchant ?? merchantTitle;
260262

261263
const saveBillable = useCallback(
262264
(newBillable: boolean) => {
@@ -562,7 +564,7 @@ function MoneyRequestView({
562564
<OfflineWithFeedback pendingAction={getPendingFieldAction('merchant')}>
563565
<MenuItemWithTopDescription
564566
description={translate('common.merchant')}
565-
title={updatedTransaction?.modifiedMerchant ?? merchantTitle}
567+
title={updatedMerchantTitle}
566568
interactive={canEditMerchant}
567569
shouldShowRightIcon={canEditMerchant}
568570
titleStyle={styles.flex1}

0 commit comments

Comments
 (0)