diff --git a/lib/adapters/mongoose.js b/lib/adapters/mongoose.js index 7e2181ae..231c515f 100644 --- a/lib/adapters/mongoose.js +++ b/lib/adapters/mongoose.js @@ -183,6 +183,7 @@ MongooseAdapter.prototype.destroyAll = function destroyAll(model, callback) { this._models[model].find(function (err, data) { if (err) return callback(err); wait = data.length; + if (!data.length) return callback(null); data.forEach(function (obj) { obj.remove(done) });