Skip to content

Commit

Permalink
adds feature to new version 1.2 to avoid breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
riascho committed Oct 29, 2024
1 parent ba4e59e commit f82787e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/nodes-base/nodes/Google/Gmail/GmailTrigger.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class GmailTrigger implements INodeType {
name: 'gmailTrigger',
icon: 'file:gmail.svg',
group: ['trigger'],
version: [1, 1.1],
version: [1, 1.1, 1.2],
description:
'Fetches emails from Gmail and starts the workflow on specified polling intervals.',
subtitle: '={{"Gmail Trigger"}}',
Expand Down Expand Up @@ -291,7 +291,12 @@ export class GmailTrigger implements INodeType {
qs.format = 'raw';
}

const includeDrafts = (qs.includeDrafts as boolean) || false;
let includeDrafts;
if (node.typeVersion > 1.1) {
includeDrafts = (qs.includeDrafts as boolean) || false;
} else {
includeDrafts = (qs.includeDrafts as boolean) || true;
}
delete qs.includeDrafts;

for (let i = 0; i < responseData.length; i++) {
Expand Down

0 comments on commit f82787e

Please sign in to comment.