This commit is contained in:
zhichen 2018-12-13 21:17:00 +08:00
parent abf4f9ba6e
commit d8291244e9
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ function getValue(key) {
if (!document.cookie) return null; if (!document.cookie) return null;
const list = document.cookie.split(';') || []; const list = document.cookie.split(';') || [];
for (const item of list) { for (const item of list) {
const [k, v] = item.split('='); const [k = '', v = ''] = item.split('=');
if (k.trim() === key) return v; if (k.trim() === key) return v;
} }
return null; return null;

File diff suppressed because one or more lines are too long