Merge branch 'master' of github.com:1602/jugglingdb
This commit is contained in:
commit
11fc70b89a
|
@ -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)
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue