Skip to content

Commit 0016edc

Browse files
committed
Cast scanCount to a number, to be safe.
1 parent e6e48c2 commit 0016edc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ function redisStore(args) {
360360

361361
// Use an object to dedupe as scan can return duplicates
362362
var keysObj = {};
363-
var scanCount = options.scanCount || 100;
363+
var scanCount = Number(options.scanCount) || 100;
364364

365365
(function nextBatch(cursorId) {
366366
conn.scan(cursorId, 'match', pattern, 'count', scanCount, function (err, result) {

0 commit comments

Comments
 (0)