Skip to content

Commit

Permalink
fix: maxage => maxAge (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
cycgit authored and dead-horse committed Dec 1, 2016
1 parent 0cff4a8 commit 0883674
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,14 +443,12 @@ function hash(sess) {
}

/**
* cookie use maxage, hack to compat connect type `maxAge`
* cookie use maxAge, hack to compat connect type `maxage`
*/
function compatMaxage(opts) {
if (opts) {
opts.maxage = opts.maxage === undefined
? opts.maxAge
: opts.maxage;
delete opts.maxAge;
opts.maxAge = opts.maxage ? opts.maxage : opts.maxAge;
delete opts.maxage;
}
}

Expand Down

0 comments on commit 0883674

Please sign in to comment.