mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 15:48:11 -05:00
Fix error handling callback
This commit is contained in:
parent
e1130ff1e8
commit
82ec29247b
1 changed files with 1 additions and 1 deletions
|
@ -249,7 +249,7 @@ module.exports = class Handler
|
|||
criteria = {}
|
||||
criteria[if nonVersioned then '_id' else 'original'] = mongoose.Types.ObjectId(id)
|
||||
@modelClass.findOne(criteria, project).sort(sort).exec (err, document) ->
|
||||
return done(err) if err
|
||||
return callback err if err
|
||||
callback(null, document?.toObject() or null)
|
||||
|
||||
funcs = {}
|
||||
|
|
Loading…
Reference in a new issue