mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
eslint (additional rules)
This commit is contained in:
parent
77a1d3f3df
commit
8e8a041032
150 changed files with 21911 additions and 23106 deletions
|
|
@ -8,14 +8,13 @@ class LocalStorageDriver
|
|||
/**
|
||||
* @param {string} key
|
||||
* @param {*} data
|
||||
* @return {boolean}
|
||||
* @returns {boolean}
|
||||
*/
|
||||
set(key, data) {
|
||||
|
||||
let
|
||||
result = false,
|
||||
storageResult = null
|
||||
;
|
||||
storageResult = null;
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -38,7 +37,7 @@ class LocalStorageDriver
|
|||
|
||||
/**
|
||||
* @param {string} key
|
||||
* @return {*}
|
||||
* @returns {*}
|
||||
*/
|
||||
get(key) {
|
||||
|
||||
|
|
@ -48,8 +47,7 @@ class LocalStorageDriver
|
|||
{
|
||||
const
|
||||
storageValue = window.localStorage[CLIENT_SIDE_STORAGE_INDEX_NAME] || null,
|
||||
storageResult = null === storageValue ? null : JSON.parse(storageValue)
|
||||
;
|
||||
storageResult = null === storageValue ? null : JSON.parse(storageValue);
|
||||
|
||||
result = (storageResult && !isUnd(storageResult[key])) ? storageResult[key] : null;
|
||||
}
|
||||
|
|
@ -59,7 +57,7 @@ class LocalStorageDriver
|
|||
}
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
* @returns {boolean}
|
||||
*/
|
||||
static supported() {
|
||||
return !!window.localStorage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue