We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3eb661 commit 4e7f9fbCopy full SHA for 4e7f9fb
browser-index.js
@@ -1,12 +1,19 @@
1
var matrixcs = require("./lib/matrix");
2
matrixcs.request(require("browser-request"));
3
4
+// just *accessing* indexedDB throws an exception in firefox with
5
+// indexeddb disabled.
6
+let indexedDB;
7
+try {
8
+ indexedDB = global.indexedDB;
9
+} catch(e) {}
10
+
11
// if our browser (appears to) support indexeddb, use an indexeddb crypto store.
-if (global.indexedDB) {
12
+if (indexedDB) {
13
matrixcs.setCryptoStoreFactory(
14
function() {
15
return new matrixcs.IndexedDBCryptoStore(
- global.indexedDB, "matrix-js-sdk:crypto"
16
+ indexedDB, "matrix-js-sdk:crypto"
17
);
18
}
19
0 commit comments