From 62d7e6d6ed42a379701bc1fbe83be406836e05d4 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Sat, 7 Sep 2019 09:11:23 +0200 Subject: [PATCH] :bug: Fix bug with data-property on EmailReadImap-Node --- packages/nodes-base/nodes/EmailReadImap.node.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/nodes/EmailReadImap.node.ts b/packages/nodes-base/nodes/EmailReadImap.node.ts index 9ef58802e7..9c01ff5b53 100644 --- a/packages/nodes-base/nodes/EmailReadImap.node.ts +++ b/packages/nodes-base/nodes/EmailReadImap.node.ts @@ -69,7 +69,7 @@ export class EmailReadImap implements INodeType { displayOptions: { show: { downloadAttachments: [ - 'true' + true ], }, }, @@ -90,7 +90,6 @@ export class EmailReadImap implements INodeType { } const mailbox = this.getNodeParameter('mailbox') as string; - const dataPropertyAttachmentsPrefixName = this.getNodeParameter('dataPropertyAttachmentsPrefixName') as string; const postProcessAction = this.getNodeParameter('postProcessAction') as string; const downloadAttachments = this.getNodeParameter('downloadAttachments') as boolean; @@ -160,6 +159,11 @@ export class EmailReadImap implements INodeType { let attachments: IBinaryData[]; let propertyName: string; + let dataPropertyAttachmentsPrefixName = ''; + if (downloadAttachments === true) { + dataPropertyAttachmentsPrefixName = this.getNodeParameter('dataPropertyAttachmentsPrefixName') as string; + } + // All properties get by default moved to metadata except the ones // which are defined here which get set on the top level. const topLevelProperties = [