Fix eslint warnings

This commit is contained in:
RainLoop Team 2016-04-20 20:12:51 +03:00
parent dd824179f1
commit 72ca818500
35 changed files with 510 additions and 290 deletions

View file

@ -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;
}