Skip to content

Commit

Permalink
Implement optional callback in db.collection.remove
Browse files Browse the repository at this point in the history
  • Loading branch information
saintedlama committed Dec 2, 2015
1 parent 3e19869 commit 709f67a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ Collection.prototype.remove = function (query, options, cb) {
if (typeof query === 'function') return this.remove({}, {justOne: false}, query)
if (typeof options === 'function') return this.remove(query, {justOne: false}, options)
if (typeof options === 'boolean') return this.remove(query, {justOne: options}, cb)
if (!options) return this.remove(query, {justOne: false}, cb)
if (!cb) return this.remove(query, options, noop)

this._getCollection(function (err, collection) {
if (err) return cb(err)
Expand Down

0 comments on commit 709f67a

Please sign in to comment.