mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 11:09:20 +03:00
Everything to ES2020
This commit is contained in:
parent
84ffe1e552
commit
78178ecc2f
16 changed files with 35 additions and 45 deletions
|
|
@ -23,7 +23,7 @@ try {
|
|||
data = data ? decodeURIComponent(data[2]) : null;
|
||||
data = data ? JSON.parse(data) : {};
|
||||
win[sName] = {
|
||||
getItem: key => data[key] == null ? null : data[key],
|
||||
getItem: key => data[key] ?? null,
|
||||
setItem: (key, value) => {
|
||||
data[key] = ''+value; // forces the value to a string
|
||||
document.cookie = sName+'='+encodeURIComponent(JSON.stringify(data))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue