diff --git a/packages/nodes-base/nodes/EditImage/EditImage.node.ts b/packages/nodes-base/nodes/EditImage/EditImage.node.ts index 136447f794..7cad992120 100644 --- a/packages/nodes-base/nodes/EditImage/EditImage.node.ts +++ b/packages/nodes-base/nodes/EditImage/EditImage.node.ts @@ -1184,6 +1184,11 @@ export class EditImage implements INodeType { gmInstance = gmInstance.background('transparent'); } + const newItem: INodeExecutionData = { + json: item.json, + binary: {}, + }; + if (operation === 'information') { // Just return the information const imageData = await new Promise((resolve, reject) => { @@ -1196,8 +1201,7 @@ export class EditImage implements INodeType { }); }); - item.json = imageData; - returnData.push(item); + newItem.json = imageData; } for (let i = 0; i < operations.length; i++) { @@ -1308,11 +1312,6 @@ export class EditImage implements INodeType { } } - const newItem: INodeExecutionData = { - json: item.json, - binary: {}, - }; - if (item.binary !== undefined) { // Create a shallow copy of the binary data so that the old // data references which do not get changed still stay behind