mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-23 22:36:01 +08:00
Fix eslint warnings
This commit is contained in:
parent
3cea84ff06
commit
e77bafca1e
1 changed files with 6 additions and 5 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue