File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
components/pipedrive/actions/remove-duplicate-notes Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -71,23 +71,19 @@ export default {
7171 } ) ;
7272
7373 for ( const note of sortedNotes ) {
74- // Normalize content by removing extra whitespace and converting to lowercase
75- const normalizedContent = note . content ?. trim ( ) . toLowerCase ( ) ;
76-
77- if ( ! normalizedContent ) {
78- // Skip notes with empty content
74+ if ( ! note . content ) {
7975 continue ;
8076 }
8177
82- if ( seenContent . has ( normalizedContent ) ) {
78+ if ( seenContent . has ( note . content ) ) {
8379 // This is a duplicate
8480 duplicates . push ( {
8581 duplicate : note ,
86- original : seenContent . get ( normalizedContent ) ,
82+ original : seenContent . get ( note . content ) ,
8783 } ) ;
8884 } else {
8985 // This is the first occurrence
90- seenContent . set ( normalizedContent , note ) ;
86+ seenContent . set ( note . content , note ) ;
9187 uniqueNotes . push ( note ) ;
9288 }
9389 }
You can’t perform that action at this time.
0 commit comments