Commit 129042fc authored by Matthew Taylor's avatar Matthew Taylor Committed by GitHub

Merge pull request #1553 from mewtaylor/issue/gh-1455

GH-1455: apply path explicitly rather than in `defaults`
parents 5f48fc13 9a3358b3
......@@ -71,10 +71,11 @@ var Jar = {
});
},
set: function (name, value, opts) {
opts = opts || {};
defaults(opts, {
expires: new Date(new Date().setYear(new Date().getFullYear() + 1)),
path: '/'
expires: new Date(new Date().setYear(new Date().getFullYear() + 1))
});
opts.path = '/';
var obj = cookie.serialize(name, value, opts);
document.cookie = obj;
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment