Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't override options.expires #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

trodrigues
Copy link
Contributor

Currently if you define both options.expires and options.maxage, maxage overrides expires.

Resubmitting with a bugfix and because I screwed up the other branch.

if (options.maxage) {
options.expires = new Date(+new Date + options.maxage);
if (options.maxage && !options.expires) {
options.expires = (new Date(+new Date + options.maxage)).toUTCString();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surrounding ()s are unnecessary

@jonathanong
Copy link
Contributor

can you add a test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants