Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Dec 23, 2024
1 parent 9440394 commit 980012c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,8 @@ function MoneyRequestPreviewContent({
// Clear the draft before selecting a different expense to prevent merging fields from the previous expense
// (e.g., category, tag, tax) that may be not enabled/available in the new expense's policy.
Transaction.abandonReviewDuplicateTransactions();
const comparisonResult = TransactionUtils.compareDuplicateTransactionFields(
reviewingTransactionID,
transaction?.reportID ?? '',
transaction?.transactionID ?? reviewingTransactionID,
);
Transaction.setReviewDuplicatesKey({...comparisonResult.keep, duplicates, transactionID: transaction?.transactionID ?? '', reportID: transaction?.reportID});
const comparisonResult = TransactionUtils.compareDuplicateTransactionFields(reviewingTransactionID, transaction?.reportID, transaction?.transactionID ?? reviewingTransactionID);
Transaction.setReviewDuplicatesKey({...comparisonResult.keep, duplicates, transactionID: transaction?.transactionID, reportID: transaction?.reportID});

if ('merchant' in comparisonResult.change) {
Navigation.navigate(ROUTES.TRANSACTION_DUPLICATE_REVIEW_MERCHANT_PAGE.getRoute(route.params?.threadReportID, backTo));
Expand Down
2 changes: 1 addition & 1 deletion src/libs/TransactionUtils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ function removeSettledAndApprovedTransactions(transactionIDs: string[]) {
function compareDuplicateTransactionFields(
reviewingTransactionID: string | undefined,
reportID: string | undefined,
selectedTransactionID?: string,
selectedTransactionID?: string | undefined,
): {keep: Partial<ReviewDuplicates>; change: FieldsToChange} {
if (!reviewingTransactionID || !reportID) {
return {change: {}, keep: {}};
Expand Down

0 comments on commit 980012c

Please sign in to comment.