We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 096542a commit 16728cfCopy full SHA for 16728cf
.changeset/good-seals-promise.md
@@ -0,0 +1,5 @@
1
+---
2
+'@firebase/app': patch
3
4
+
5
+Catch possible error in Safari browsers.
packages/app/src/indexeddb.ts
@@ -45,7 +45,14 @@ function getDbPromise(): Promise<IDBPDatabase<AppDB>> {
45
// eslint-disable-next-line default-case
46
switch (oldVersion) {
47
case 0:
48
- db.createObjectStore(STORE_NAME);
+ try {
49
+ db.createObjectStore(STORE_NAME);
50
+ } catch (e) {
51
+ // Safari/iOS browsers throw occasional exceptions on
52
+ // db.createObjectStore() that may be a bug. Avoid blocking
53
+ // the rest of the app functionality.
54
+ console.warn(e);
55
+ }
56
}
57
58
}).catch(e => {
0 commit comments