mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
🐛 Fix bug that two items get returned
This commit is contained in:
@@ -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<IDataObject>((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
|
||||
|
||||
Reference in New Issue
Block a user