Skip to content

Commit cdd06b8

Browse files
committed
update
1 parent f23c3b1 commit cdd06b8

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

components/pipedrive/actions/remove-duplicate-notes/remove-duplicate-notes.mjs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)