Skip to content

Commit d4eaaf4

Browse files
authored
Merge pull request #1534 from TomSssM/patch-1
fix a minor bug in the example
2 parents 726f2a8 + 83cdced commit d4eaaf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
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.toUTCString) {
313+
if (options.expires && options.expires.toUTCString) {
314314
options.expires = options.expires.toUTCString();
315315
}
316316

0 commit comments

Comments
 (0)