Code refactoring

This commit is contained in:
RainLoop Team 2016-06-16 02:36:44 +03:00
parent 60bac7192f
commit 90d95d3ca4
28 changed files with 977 additions and 924 deletions

View file

@ -22,10 +22,7 @@ class CookieDriver
const storageValue = $.cookie(CLIENT_SIDE_STORAGE_INDEX_NAME);
storageResult = null === storageValue ? null : JSON.parse(storageValue);
}
catch (e)
{
// eslint-disable-line no-empty
}
catch (e) {/* eslint-disable-line no-empty */}
(storageResult || (storageResult = {}))[key] = data;
@ -37,10 +34,7 @@ class CookieDriver
result = true;
}
catch (e)
{
// eslint-disable-line no-empty
}
catch (e) {/* eslint-disable-line no-empty */}
return result;
}
@ -62,10 +56,7 @@ class CookieDriver
result = (storageResult && !isUnd(storageResult[key])) ? storageResult[key] : null;
}
catch (e)
{
// eslint-disable-line no-empty
}
catch (e) {/* eslint-disable-line no-empty */}
return result;
}

View file

@ -22,10 +22,7 @@ class LocalStorageDriver
const storageValue = window.localStorage[CLIENT_SIDE_STORAGE_INDEX_NAME] || null;
storageResult = null === storageValue ? null : JSON.parse(storageValue);
}
catch (e)
{
// eslint-disable-line no-empty
}
catch (e) {/* eslint-disable-line no-empty */}
(storageResult || (storageResult = {}))[key] = data;
@ -34,10 +31,7 @@ class LocalStorageDriver
window.localStorage[CLIENT_SIDE_STORAGE_INDEX_NAME] = JSON.stringify(storageResult);
result = true;
}
catch (e)
{
// eslint-disable-line no-empty
}
catch (e) {/* eslint-disable-line no-empty */}
return result;
}
@ -59,10 +53,7 @@ class LocalStorageDriver
result = (storageResult && !isUnd(storageResult[key])) ? storageResult[key] : null;
}
catch (e)
{
// eslint-disable-line no-empty
}
catch (e) {/* eslint-disable-line no-empty */}
return result;
}