Skip to content

Commit

Permalink
6801 catch insecure indexedDB access
Browse files Browse the repository at this point in the history
  • Loading branch information
abilicz committed Nov 30, 2022
1 parent 1625f7a commit 44212ba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/util/src/environment.ts
Expand Up @@ -140,7 +140,12 @@ export function isSafari(): boolean {
* @return true if indexedDB is supported by current browser/service worker context
*/
export function isIndexedDBAvailable(): boolean {
return typeof indexedDB === 'object';
try {
return typeof indexedDB === 'object';
}
catch (error) {
return false;
}
}

/**
Expand Down

0 comments on commit 44212ba

Please sign in to comment.