File tree 2 files changed +3
-4
lines changed
pages/TransactionDuplicate
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -982,7 +982,7 @@ function compareDuplicateTransactionFields(transactionID: string): {keep: Partia
982
982
983
983
// Helper function to check if all comments are equal
984
984
function areAllCommentsEqual ( items : Array < OnyxEntry < Transaction > > , firstTransaction : OnyxEntry < Transaction > ) {
985
- return items . every ( ( item ) => lodashIsEqual ( item ?. comment , firstTransaction ?. comment ) ) ;
985
+ return items . every ( ( item ) => lodashIsEqual ( getDescription ( item ) , getDescription ( firstTransaction ) ) ) ;
986
986
}
987
987
988
988
// Helper function to check if all fields are equal for a given key
@@ -1007,8 +1007,7 @@ function compareDuplicateTransactionFields(transactionID: string): {keep: Partia
1007
1007
1008
1008
if ( fieldName === 'description' ) {
1009
1009
const allCommentsAreEqual = areAllCommentsEqual ( transactions , firstTransaction ) ;
1010
- const allCommentsAreEmpty = isFirstTransactionCommentEmptyObject && transactions . every ( ( item ) => item ?. comment === undefined ) ;
1011
-
1010
+ const allCommentsAreEmpty = isFirstTransactionCommentEmptyObject && transactions . every ( ( item ) => getDescription ( item ) === '' ) ;
1012
1011
if ( allCommentsAreEqual || allCommentsAreEmpty ) {
1013
1012
keep [ fieldName ] = firstTransaction ?. comment ?. comment ?? firstTransaction ?. comment ;
1014
1013
} else {
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ function Confirmation() {
71
71
ReportUtils . isReportNotFound ( report ) ||
72
72
( reviewDuplicatesResult . status === 'loaded' && ( ! transaction ?. transactionID || ! doesTransactionBelongToReport ) ) ;
73
73
74
- if ( isLoadingOnyxValue ( reviewDuplicatesResult , reportResult ) ) {
74
+ if ( isLoadingOnyxValue ( reviewDuplicatesResult , reportResult ) || ! transaction ?. transactionID ) {
75
75
return < FullScreenLoadingIndicator /> ;
76
76
}
77
77
You can’t perform that action at this time.
0 commit comments