Skip to content

Commit

Permalink
Make checking for err object less verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
saintedlama committed Nov 30, 2015
1 parent 54a9ab9 commit d079280
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ Collection.prototype.remove = function (query, options, cb) {
// TODO: Duplicate code - see xtend below
if (options.justOne) {
collection.deleteOne(query, xtend(writeOpts, options), function (err, result) {
if (err) { return cb(err) }
if (err) return cb(err)
cb(null, result.result)
})
} else {
collection.deleteMany(query, xtend(writeOpts, options), function (err, result) {
if (err) { return cb(err) }
if (err) return cb(err)
cb(null, result.result)
})
}
Expand Down

0 comments on commit d079280

Please sign in to comment.