mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(RSS Feed Trigger Node): Use newest date instead of first item for new items (#9182)
Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
This commit is contained in:
@@ -76,7 +76,10 @@ export class RssFeedReadTrigger implements INodeType {
|
||||
returnData.push(item);
|
||||
}
|
||||
});
|
||||
pollData.lastItemDate = feed.items[0].isoDate;
|
||||
const maxIsoDate = feed.items.reduce((a, b) =>
|
||||
new Date(a.isoDate as string) > new Date(b.isoDate as string) ? a : b,
|
||||
).isoDate;
|
||||
pollData.lastItemDate = maxIsoDate;
|
||||
}
|
||||
|
||||
if (Array.isArray(returnData) && returnData.length !== 0) {
|
||||
|
||||
Reference in New Issue
Block a user