Skip to content

Commit e33d728

Browse files
abiliczabilicz
abilicz
authored andcommitted
6801 catch insecure indexedDB access
1 parent 1625f7a commit e33d728

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/util/src/environment.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,12 @@ export function isSafari(): boolean {
140140
* @return true if indexedDB is supported by current browser/service worker context
141141
*/
142142
export function isIndexedDBAvailable(): boolean {
143-
return typeof indexedDB === 'object';
143+
try {
144+
return typeof indexedDB === 'object';
145+
}
146+
catch (e) {
147+
return false;
148+
}
144149
}
145150

146151
/**

0 commit comments

Comments
 (0)