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

@@ -35,7 +35,9 @@ export class SplitInBatches implements INodeType {
};
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][] | null> {
const items = this.getInputData();
// Get the input data and create a new array so that we can remove
// items without a problem
const items = this.getInputData().slice();
const nodeContext = this.getContext('node');