rethinkdbdash
Advanced tools
Comparing version 1.16.2 to 1.16.3
@@ -247,3 +247,4 @@ var Promise = require("bluebird"); | ||
self._next().then(resolve).error(function(error) { | ||
if (error.message !== "You cannot retrieve data from a cursor that is closed.") { | ||
if ((error.message !== "You cannot retrieve data from a cursor that is closed.") && | ||
(error.message.match(/You cannot called `next` on a closed/) === null)) { | ||
reject(error); | ||
@@ -257,5 +258,7 @@ } | ||
// We can silence error when the cursor is closed as this | ||
if (error.message !== "You cannot retrieve data from a cursor that is closed.") { | ||
if ((error.message !== "You cannot retrieve data from a cursor that is closed.") && | ||
(error.message.match(/You cannot called `next` on a closed/) === null)) { | ||
reject(error); | ||
} | ||
}); | ||
@@ -262,0 +265,0 @@ } |
{ | ||
"name": "rethinkdbdash", | ||
"version": "1.16.2", | ||
"version": "1.16.3", | ||
"description": "A Node.js driver for RethinkDB with promises and a connection pool", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -612,15 +612,16 @@ var config = require('./config.js'); | ||
try { | ||
feed = yield r.db(dbName).table(tableName2).changes().run(); | ||
feed = yield r.db(dbName).table(tableName2).get(1).changes().run(); | ||
setImmediate(function() { | ||
r.db(dbName).table(tableName2).limit(2).update({foo: r.now()}).run(); | ||
r.db(dbName).table(tableName2).insert({id: 1}).run(); | ||
}) | ||
var count = 0; | ||
feed.on('data', function(result) { | ||
feed.each(function(err, result) { | ||
if (err) { | ||
return done(err); | ||
} | ||
count++; | ||
if (count === 1) { | ||
setImmediate(function() { | ||
feed.close().then(function() { | ||
done(); | ||
}).error(done); | ||
}); | ||
feed.close().then(function() { | ||
done(); | ||
}).error(done); | ||
} | ||
@@ -627,0 +628,0 @@ }); |
565339
16727