Fix eslint warnings

This commit is contained in:
RainLoop Team 2019-03-28 02:27:52 +03:00
parent 3cea84ff06
commit e77bafca1e

View file

@ -11,11 +11,13 @@ const TIME_KEY = '__rlT';
export function isStorageSupported(storageName) export function isStorageSupported(storageName)
{ {
let storageIsAvailable = false; let storageIsAvailable = false;
try { try
{
// at: window[storageName] firefox throws SecurityError: The operation is insecure. when in iframe
storageIsAvailable = storageName in window && window[storageName] && window[storageName].setItem; storageIsAvailable = storageName in window && window[storageName] && window[storageName].setItem;
} }
catch(e) {} // at: window[storageName] firefox throws SecurityError: The operation is insecure. when in iframe catch (e) {} // eslint-disable-line no-empty
if (storageIsAvailable) if (storageIsAvailable)
{ {
const const
@ -34,7 +36,6 @@ export function isStorageSupported(storageName)
catch (e) {} // eslint-disable-line no-empty catch (e) {} // eslint-disable-line no-empty
} }
return false; return false;
} }