mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 04:59:21 +03:00
Fix eslint warnings
This commit is contained in:
parent
dd824179f1
commit
72ca818500
35 changed files with 510 additions and 290 deletions
|
|
@ -22,7 +22,10 @@ class LocalStorageDriver
|
|||
const storageValue = window.localStorage[CLIENT_SIDE_STORAGE_INDEX_NAME] || null;
|
||||
storageResult = null === storageValue ? null : JSON.parse(storageValue);
|
||||
}
|
||||
catch (e) {}
|
||||
catch (e)
|
||||
{
|
||||
// eslint-disable-line no-empty
|
||||
}
|
||||
|
||||
(storageResult || (storageResult = {}))[key] = data;
|
||||
|
||||
|
|
@ -31,7 +34,10 @@ class LocalStorageDriver
|
|||
window.localStorage[CLIENT_SIDE_STORAGE_INDEX_NAME] = JSON.stringify(storageResult);
|
||||
result = true;
|
||||
}
|
||||
catch (e) {}
|
||||
catch (e)
|
||||
{
|
||||
// eslint-disable-line no-empty
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -41,19 +47,22 @@ class LocalStorageDriver
|
|||
* @return {*}
|
||||
*/
|
||||
get(key) {
|
||||
|
||||
|
||||
let result = null;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
const
|
||||
const
|
||||
storageValue = window.localStorage[CLIENT_SIDE_STORAGE_INDEX_NAME] || null,
|
||||
storageResult = null === storageValue ? null : JSON.parse(storageValue)
|
||||
;
|
||||
|
||||
result = (storageResult && !Utils.isUnd(storageResult[key])) ? storageResult[key] : null
|
||||
result = (storageResult && !Utils.isUnd(storageResult[key])) ? storageResult[key] : null;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
// eslint-disable-line no-empty
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue