We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7441ec7 commit 4cd7df2Copy full SHA for 4cd7df2
src/js.cookie.js
@@ -51,9 +51,7 @@
51
}, api.defaults, attributes);
52
53
if (typeof attributes.expires === 'number') {
54
- var expires = new Date();
55
- expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
56
- attributes.expires = expires;
+ attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
57
}
58
59
// We're using "expires" because "max-age" is not supported by IE
0 commit comments