File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @firebase/app ' : patch
3+ ---
4+
5+ Catch more heartbeat read/write errors.
Original file line number Diff line number Diff line change @@ -62,10 +62,11 @@ export async function readHeartbeatsFromIndexedDB(
6262) : Promise < HeartbeatsInIndexedDB | undefined > {
6363 try {
6464 const db = await getDbPromise ( ) ;
65- return db
65+ const result = await db
6666 . transaction ( STORE_NAME )
6767 . objectStore ( STORE_NAME )
68- . get ( computeKey ( app ) ) as Promise < HeartbeatsInIndexedDB | undefined > ;
68+ . get ( computeKey ( app ) ) ;
69+ return result ;
6970 } catch ( e ) {
7071 if ( e instanceof FirebaseError ) {
7172 logger . warn ( e . message ) ;
@@ -87,7 +88,7 @@ export async function writeHeartbeatsToIndexedDB(
8788 const tx = db . transaction ( STORE_NAME , 'readwrite' ) ;
8889 const objectStore = tx . objectStore ( STORE_NAME ) ;
8990 await objectStore . put ( heartbeatObject , computeKey ( app ) ) ;
90- return tx . done ;
91+ await tx . done ;
9192 } catch ( e ) {
9293 if ( e instanceof FirebaseError ) {
9394 logger . warn ( e . message ) ;
You can’t perform that action at this time.
0 commit comments