provide a default opts if it’s undefined

This commit is contained in:
Matthew Taylor 2017-09-18 14:40:52 -04:00
parent 4175c119d2
commit 9a3358b35c

View file

@ -71,6 +71,7 @@ var Jar = {
});
},
set: function (name, value, opts) {
opts = opts || {};
defaults(opts, {
expires: new Date(new Date().setYear(new Date().getFullYear() + 1))
});