diff --git a/dev/Storage/RainLoop.js b/dev/Storage/RainLoop.js index 2957c34e1..af0a44ce0 100644 --- a/dev/Storage/RainLoop.js +++ b/dev/Storage/RainLoop.js @@ -10,7 +10,13 @@ const TIME_KEY = '__rlT'; */ export function isStorageSupported(storageName) { - if (storageName in window && window[storageName] && window[storageName].setItem) + let storageIsAvailable = false; + try { + storageIsAvailable = storageName in window && window[storageName] && window[storageName].setItem; + } + catch(e) {} // at: window[storageName] firefox throws SecurityError: The operation is insecure. when in iframe + + if (storageIsAvailable) { const s = window[storageName], @@ -28,6 +34,7 @@ export function isStorageSupported(storageName) catch (e) {} // eslint-disable-line no-empty } + return false; }