Copy data on execution only if needed

This commit is contained in:
Jan Oberhauser
2019-08-01 22:55:33 +02:00
parent a8f1f9c0ba
commit 1b59d7b886
20 changed files with 182 additions and 65 deletions

View File

@@ -178,14 +178,19 @@ export class Merge implements INodeType {
if (['null', 'undefined'].includes(typeof referenceValue)) {
continue;
}
// Copy the entry as the data gets changed
entry = JSON.parse(JSON.stringify(entry));
for (key of Object.keys(copyData[referenceValue as string].json)) {
// TODO: Currently only copies json data and no binary one
entry.json[key] = copyData[referenceValue as string].json[key];
}
}
returnData.push(entry);
}
return [dataInput1];
return [returnData];
} else if (mode === 'passThrough') {
const output = this.getNodeParameter('output', 0) as string;