diff --git a/lib/index.js b/lib/index.js index a892c55..48a8c76 100644 --- a/lib/index.js +++ b/lib/index.js @@ -140,7 +140,7 @@ Grid.prototype.findOne = function (options, callback) { collection.find(find, function(err, cursor) { if (err) { return callback(err); } if (!cursor) { return callback(new Error('Collection not found')); } - cursor.nextObject(callback); + cursor.next(callback); }); } diff --git a/package.json b/package.json index 07e2371..98e4dbf 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "mocha": "*", - "mongodb": "2.0.15", + "mongodb": "3.1.1", "checksum": "~0.1.1" }, "optionalDependencies": {},