Skip to content

Commit 83cdced

Browse files
committed
fix a minor bug in the example
1 parent 4159a65 commit 83cdced

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)