diff --git a/lib/helpers/cursor/eachAsync.js b/lib/helpers/cursor/eachAsync.js index 472dbeee187..95a38dbf93a 100644 --- a/lib/helpers/cursor/eachAsync.js +++ b/lib/helpers/cursor/eachAsync.js @@ -99,13 +99,11 @@ function asyncQueue() { }; function _step() { - setTimeout(() => { - inProgress = null; - if (_queue.length > 0) { - inProgress = id++; - const fn = _queue.shift(); - fn(_step); - } - }, 0); + inProgress = null; + if (_queue.length > 0) { + inProgress = id++; + const fn = _queue.shift(); + fn(_step); + } } } \ No newline at end of file