File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8181 },
8282 {
8383 "path" : " ./build/releases/OneSignalSDK.page.es6.js" ,
84- "limit" : " 55.07 kB" ,
84+ "limit" : " 55.08 kB" ,
8585 "gzip" : true
8686 },
8787 {
8888 "path" : " ./build/releases/OneSignalSDK.sw.js" ,
89- "limit" : " 15.41 kB" ,
89+ "limit" : " 15.42 kB" ,
9090 "gzip" : true
9191 },
9292 {
Original file line number Diff line number Diff line change 11import { openDB , type StoreNames } from 'idb' ;
2+ import Log from '../libraries/Log' ;
23import { ONESIGNAL_SESSION_KEY } from '../session/constants' ;
34import { IS_SERVICE_WORKER } from '../utils/EnvVariables' ;
45import {
@@ -20,7 +21,7 @@ let dbInstance: Awaited<ReturnType<typeof openDB<IndexedDBSchema>>> | null =
2021export const getDb = async ( version = VERSION ) => {
2122 if ( dbInstance ) return dbInstance ;
2223 dbInstance = await openDB < IndexedDBSchema > ( DATABASE_NAME , version , {
23- async upgrade ( _db , oldVersion , newVersion , transaction ) {
24+ upgrade ( _db , oldVersion , newVersion , transaction ) {
2425 const newDbVersion = newVersion || version ;
2526 if ( newDbVersion >= 1 && oldVersion < 1 ) {
2627 _db . createObjectStore ( 'Ids' , { keyPath : 'type' } ) ;
@@ -80,6 +81,9 @@ export const getDb = async (version = VERSION) => {
8081 OneSignal . _isNewVisitor = true ;
8182 }
8283 } ,
84+ blocked ( ) {
85+ Log . debug ( 'IndexedDB: Blocked event' ) ;
86+ } ,
8387 } ) ;
8488 return dbInstance ;
8589} ;
You can’t perform that action at this time.
0 commit comments