diff --git a/src/vector/rageshake.js b/src/vector/rageshake.js index 0138d624..249f1f27 100644 --- a/src/vector/rageshake.js +++ b/src/vector/rageshake.js @@ -410,8 +410,16 @@ module.exports = { } logger = new ConsoleLogger(); logger.monkeyPatch(window.console); - if (window.indexedDB) { - store = new IndexedDBLogStore(window.indexedDB, logger); + + // just *accessing* indexedDB throws an exception in firefox with + // indexeddb disabled. + let indexedDB; + try { + indexedDB = window.indexedDB; + } catch(e) {} + + if (indexedDB) { + store = new IndexedDBLogStore(indexedDB, logger); initPromise = store.connect(); return initPromise; }