mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
🐛 Fix bug that two items get returned
This commit is contained in:
parent
214dd5061e
commit
9d42a07a0b
|
@ -1184,6 +1184,11 @@ export class EditImage implements INodeType {
|
||||||
gmInstance = gmInstance.background('transparent');
|
gmInstance = gmInstance.background('transparent');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const newItem: INodeExecutionData = {
|
||||||
|
json: item.json,
|
||||||
|
binary: {},
|
||||||
|
};
|
||||||
|
|
||||||
if (operation === 'information') {
|
if (operation === 'information') {
|
||||||
// Just return the information
|
// Just return the information
|
||||||
const imageData = await new Promise<IDataObject>((resolve, reject) => {
|
const imageData = await new Promise<IDataObject>((resolve, reject) => {
|
||||||
|
@ -1196,8 +1201,7 @@ export class EditImage implements INodeType {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
item.json = imageData;
|
newItem.json = imageData;
|
||||||
returnData.push(item);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < operations.length; i++) {
|
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) {
|
if (item.binary !== undefined) {
|
||||||
// Create a shallow copy of the binary data so that the old
|
// Create a shallow copy of the binary data so that the old
|
||||||
// data references which do not get changed still stay behind
|
// data references which do not get changed still stay behind
|
||||||
|
|
Loading…
Reference in a new issue