mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Fix load failure in firefox when indexedDB is disabled
This commit is contained in:
parent
8b65b96adf
commit
6e52ab6182
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user