Skip to content

Commit ce23350

Browse files
authored
amend check of options.expires
enough to check if it's an instance of `Date`
1 parent 6333468 commit ce23350

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

6-data-storage/01-cookie/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ function setCookie(name, value, options = {}) {
311311
...options
312312
};
313313

314-
if (options.expires instanceof Date && options.expires.toUTCString) {
314+
if (options.expires instanceof Date) {
315315
options.expires = options.expires.toUTCString();
316316
}
317317

0 commit comments

Comments
 (0)