Skip to content

Commit

Permalink
Added default indexedDB factory to IndexedDBStore.create
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Apr 21, 2024
1 parent df37633 commit 3b92398
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IndexedDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class IndexedDBTransaction implements AsyncTransaction {
}

export class IndexedDBStore implements AsyncStore {
public static async create(storeName: string, indexedDB: IDBFactory): Promise<IndexedDBStore> {
public static async create(storeName: string, indexedDB: IDBFactory = globalThis.indexedDB): Promise<IndexedDBStore> {
const req: IDBOpenDBRequest = indexedDB.open(storeName, 1);

req.onupgradeneeded = () => {
Expand Down

0 comments on commit 3b92398

Please sign in to comment.