Compare interger instead of strings

This commit is contained in:
Daniel García Aubert 2017-03-29 19:51:19 +02:00
parent 34b352a0a6
commit 2edfd1fad5

View File

@ -43,7 +43,8 @@ QueueSeeker.prototype._seek = function (client, cursor, users, attemps, callback
}); });
} }
var hasMore = currentCursor[0] !== '0' && attemps < MAX_SCAN_ATTEMPTS; var hasMore = (parseInt(currentCursor[0], 10) > 0) && (attemps < MAX_SCAN_ATTEMPTS);
if (!hasMore) { if (!hasMore) {
return callback(null, users); return callback(null, users);
} }