Skip to content

Commit

Permalink
Prefer err over er.
Browse files Browse the repository at this point in the history
Fixing a naming inconsistency in one of the functions. A purely stylistic update.
  • Loading branch information
knoxcard authored and wavded committed Aug 28, 2019
1 parent c951850 commit 1ff6489
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/connect-redis.js
Expand Up @@ -29,15 +29,15 @@ module.exports = function(session) {
get(sid, cb = noop) {
let key = this.prefix + sid

this.client.get(key, (er, data) => {
if (er) return cb(er)
this.client.get(key, (err, data) => {
if (err) return cb(err)
if (!data) return cb()

let result
try {
result = this.serializer.parse(data)
} catch (er) {
return cb(er)
} catch (err) {
return cb(err)
}
return cb(null, result)
})
Expand Down

0 comments on commit 1ff6489

Please sign in to comment.