From 9c479abc35da9f31e1f4f4ef62ba5c580575784c Mon Sep 17 00:00:00 2001 From: Omar Ajoue Date: Thu, 7 Jan 2021 07:53:48 +0100 Subject: [PATCH] :bug: Fixed batch sizing to work when batchSize = 1 (#1314) --- packages/nodes-base/nodes/HttpRequest.node.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/HttpRequest.node.ts b/packages/nodes-base/nodes/HttpRequest.node.ts index b9c59ed13a..6c8225aaf9 100644 --- a/packages/nodes-base/nodes/HttpRequest.node.ts +++ b/packages/nodes-base/nodes/HttpRequest.node.ts @@ -656,7 +656,7 @@ export class HttpRequest implements INodeType { if (itemIndex > 0 && options.batchSize as number >= 0 && options.batchInterval as number > 0) { // defaults batch size to 1 of it's set to 0 const batchSize: number = options.batchSize as number > 0 ? options.batchSize as number : 1; - if (itemIndex % batchSize === 1) { + if (itemIndex % batchSize === 0) { await new Promise(resolve => setTimeout(resolve, options.batchInterval as number)); } }