diff --git a/src/index.js b/src/index.js index 4df8172..b5f576f 100644 --- a/src/index.js +++ b/src/index.js @@ -74,7 +74,7 @@ var Loader = exports.Loader = function(dbOrUri, options) { safe: true }, options); } - + this.options = options; this.modifiers = []; }; @@ -192,7 +192,7 @@ Loader.prototype.clear = function(collectionNames, cb) { async.forEach(results.collectionNames, function(name, cb) { var collection = results.db.collection(name); - collection.drop(cb); + collection.removeMany({}, cb); }, cb); } else { cb(); } } @@ -514,4 +514,4 @@ var _buildConnectionUri = function(options) { parts.push(options.db); return parts.join(''); -} \ No newline at end of file +}