From 56429ffebfbd83a36495669fa485f3efd0a06a93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Wed, 29 Mar 2017 19:54:08 +0200 Subject: [PATCH] Use traditional for loop instead of .forEach() --- batch/pubsub/queue-seeker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/batch/pubsub/queue-seeker.js b/batch/pubsub/queue-seeker.js index 46ed0c6f..00d672f0 100644 --- a/batch/pubsub/queue-seeker.js +++ b/batch/pubsub/queue-seeker.js @@ -37,10 +37,10 @@ QueueSeeker.prototype._seek = function (client, cursor, users, attemps, callback var queues = currentCursor[1]; if (queues) { - queues.forEach(function (queue) { - var user = queue.substr(QUEUE.PREFIX.length); + for (var i = 0; i < queues.length; i++) { + var user = queues[i].substr(QUEUE.PREFIX.length); users[user] = true; - }); + } } var hasMore = (parseInt(currentCursor[0], 10) > 0) && (attemps < MAX_SCAN_ATTEMPTS);