diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/queue.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/queue.js b/tools/queue.js index cbd515b..1e2b073 100644 --- a/tools/queue.js +++ b/tools/queue.js @@ -6,9 +6,9 @@ module.exports = function(delayms, maxExport, call){ let getObjs = (maxExport == 1) ? () => queue.shift() : () => queue.splice(0, maxExport) ; - this.enqueue = function(){ - for (let i = 0; i < arguments.length; i++) - queue.push(arguments[i]); + this.enqueue = function(arr){ + for (item of arr) + queue.push(item); if (open) dequeue(); } |