From e77bafca1e8984dfacd84e41f4ca697e8c0526e2 Mon Sep 17 00:00:00 2001 From: RainLoop Team Date: Thu, 28 Mar 2019 02:27:52 +0300 Subject: [PATCH] Fix eslint warnings --- dev/Storage/RainLoop.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dev/Storage/RainLoop.js b/dev/Storage/RainLoop.js index af0a44ce0..e71018891 100644 --- a/dev/Storage/RainLoop.js +++ b/dev/Storage/RainLoop.js @@ -11,11 +11,13 @@ const TIME_KEY = '__rlT'; export function isStorageSupported(storageName) { 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; - } - catch(e) {} // at: window[storageName] firefox throws SecurityError: The operation is insecure. when in iframe - + } + catch (e) {} // eslint-disable-line no-empty + if (storageIsAvailable) { const @@ -34,7 +36,6 @@ export function isStorageSupported(storageName) catch (e) {} // eslint-disable-line no-empty } - return false; }