Skip to content

Commit 6f28c6a

Browse files
author
Jeremiah Lee Cohick
committed
Cursor should be a string
1 parent 010a2ac commit 6f28c6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/scan.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var redis = require("redis"),
22
client = redis.createClient();
33

4-
var cursor = 0;
4+
var cursor = '0';
55

66
function scan() {
77
client.scan(
@@ -17,7 +17,7 @@ function scan() {
1717
// From <http://redis.io/commands/scan>:
1818
// An iteration starts when the cursor is set to 0,
1919
// and terminates when the cursor returned by the server is 0.
20-
if (cursor === 0) {
20+
if (cursor === '0') {
2121
return console.log('Iteration complete');
2222
} else {
2323
// Remember, more keys than COUNT or no keys may be returned

0 commit comments

Comments
 (0)