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

Cookies.set ignores Date object in "expires" option #489

Closed
xnoybis opened this issue Mar 30, 2017 · 2 comments
Closed

Cookies.set ignores Date object in "expires" option #489

xnoybis opened this issue Mar 30, 2017 · 2 comments
Milestone

Comments

@xnoybis
Copy link

xnoybis commented Mar 30, 2017

Software version

Quasar: 0.5.2
OS: Ubuntu 16.04
Node: 4.2.6
NPM: 3.5.2
Browsers: All

What did you get as the error?

No indication/error thrown.

What were you expecting?

Cookies.set method to set expiration for the cookie, using Date object.

Documentation (http://quasar-framework.org/api/js-cookies.html) states the following:
"Define lifetime of the cookie. Value can be a Number which will be interpreted as days from time of creation or a Date object. If omitted, the cookie becomes a session cookie."

Method handles only the Number scenario, when a Date object is passed it is ignored and cookie expires with session.

What steps did you take, to get the error?

import { Cookies } from 'quasar'

let expiryDate = new Date();
Cookies.set('bigsecret', 'foo', { expires: expiryDate });

@rstoenescu
Copy link
Member

Hi, will investigate. Thanks for reporting.

@rstoenescu
Copy link
Member

Pushed fix. Available in edge version and future v0.14.

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

No branches or pull requests

2 participants