File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " firebase " : patch
3
+ " @firebase/util " : patch
4
+ ---
5
+
6
+ Extended Usage of ` isIndexedDBAvailable ` to Service Worker
Original file line number Diff line number Diff line change @@ -136,14 +136,11 @@ export function isSafari(): boolean {
136
136
}
137
137
138
138
/**
139
- * This method checks if indexedDB is supported by current browser
140
- * @return true if indexedDB is supported by current browser
139
+ * This method checks if indexedDB is supported by current browser/service worker context
140
+ * @return true if indexedDB is supported by current browser/service worker context
141
141
*/
142
142
export function isIndexedDBAvailable ( ) : boolean {
143
- if ( ! ( 'indexedDB' in window ) || indexedDB === null ) {
144
- return false ;
145
- }
146
- return true ;
143
+ return 'indexedDB' in self && indexedDB !== null ;
147
144
}
148
145
149
146
/**
You can’t perform that action at this time.
0 commit comments