There was an error while loading. Please reload this page.
1 parent 2d5239d commit 90bccd6Copy full SHA for 90bccd6
lib/mongodb/db.js
@@ -225,14 +225,14 @@ Db.prototype.collection = function(collectionName, callback) {
225
if(collections.length == 0) {
226
callback(new Error("Collection " + collectionName + " does not exist. Currently in strict mode."), null);
227
} else {
228
- callback(null, new Collection(self, collectionName, self.pkFactory));
+ return callback(null, new Collection(self, collectionName, self.pkFactory));
229
}
230
});
231
232
233
234
} catch(err) {
235
- callback(err, null);
+ return callback(err, null);
236
237
};
238
0 commit comments