Skip to content

Commit db3b3f8

Browse files
committed
minor fixes
1 parent 7cd8f55 commit db3b3f8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

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

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

6-data-storage/01-cookie/cookie.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function setCookie(name, value, options = {}) {
1313
...options
1414
};
1515

16-
if (options.expires.toUTCString) {
16+
if (options.expires instanceof Date) {
1717
options.expires = options.expires.toUTCString();
1818
}
1919

0 commit comments

Comments
 (0)