mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(Gmail Trigger Node): Early returns in case of no data (#6727)
This commit is contained in:
@@ -257,8 +257,9 @@ export class GmailTrigger implements INodeType {
|
||||
);
|
||||
responseData = responseData.messages;
|
||||
|
||||
if (responseData === undefined) {
|
||||
responseData = [];
|
||||
if (!responseData?.length) {
|
||||
webhookData.lastTimeChecked = endDate;
|
||||
return null;
|
||||
}
|
||||
|
||||
const simple = this.getNodeParameter('simple') as boolean;
|
||||
@@ -312,6 +313,11 @@ export class GmailTrigger implements INodeType {
|
||||
);
|
||||
}
|
||||
|
||||
if (!responseData?.length) {
|
||||
webhookData.lastTimeChecked = endDate;
|
||||
return null;
|
||||
}
|
||||
|
||||
const getEmailDateAsSeconds = (email: IDataObject) => {
|
||||
const { internalDate, date } = email;
|
||||
return internalDate
|
||||
|
||||
Reference in New Issue
Block a user