minor fixes

This commit is contained in:
Ilya Kantor 2020-01-19 22:32:38 +01:00
parent 7cd8f55be2
commit db3b3f8e7a
2 changed files with 2 additions and 2 deletions

View file

@ -310,7 +310,7 @@ function setCookie(name, value, options = {}) {
...options ...options
}; };
if (options.expires && options.expires.toUTCString) { if (options.expires instanceof Date) {
options.expires = options.expires.toUTCString(); options.expires = options.expires.toUTCString();
} }

View file

@ -13,7 +13,7 @@ function setCookie(name, value, options = {}) {
...options ...options
}; };
if (options.expires.toUTCString) { if (options.expires instanceof Date) {
options.expires = options.expires.toUTCString(); options.expires = options.expires.toUTCString();
} }