Skip to content

Commit

Permalink
Cursor should be a string
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremiah Lee Cohick committed Jul 10, 2015
1 parent 010a2ac commit 6f28c6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/scan.js
@@ -1,7 +1,7 @@
var redis = require("redis"),
client = redis.createClient();

var cursor = 0;
var cursor = '0';

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

0 comments on commit 6f28c6a

Please sign in to comment.