Merge pull request #1534 from TomSssM/patch-1

fix a minor bug in the example
This commit is contained in:
Ilya Kantor 2019-10-29 23:40:52 +03:00 committed by GitHub
commit d4eaaf4ce5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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