Skip to content

Commit b956907

Browse files
committed
Syntax adjustments
1 parent e4ae1c6 commit b956907

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/hubspot/actions/get-associated-emails/get-associated-emails.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,16 @@ export default {
8787
});
8888

8989
// Sort emails by timestamp in descending order (most recent first)
90-
const sortedEmails = emails?.sort((a, b) => {
90+
emails?.sort((a, b) => {
9191
const timestampA = new Date(a.properties?.hs_timestamp || 0).getTime();
9292
const timestampB = new Date(b.properties?.hs_timestamp || 0).getTime();
9393
return timestampB - timestampA;
9494
}) || [];
9595

96-
const summary = `Successfully retrieved ${sortedEmails?.length || 0} email(s)`;
96+
const summary = `Successfully retrieved ${emails.length} email(s)`;
9797

9898
$.export("$summary", summary);
9999

100-
return sortedEmails;
100+
return emails;
101101
},
102102
};

0 commit comments

Comments
 (0)