diff --git a/src/StorageEngineFactory.ts b/src/StorageEngineFactory.ts index 2fc3669..c4e6e0f 100644 --- a/src/StorageEngineFactory.ts +++ b/src/StorageEngineFactory.ts @@ -20,20 +20,8 @@ export function createIDBStorageEngine< >(config: { name: string; version: number; schema: TDatabaseSchema }) { validateSchema(config.schema); - let channelConstructor: (new (name: string) => BroadcastChannel) | undefined = - undefined; - - if (typeof BroadcastChannel !== "undefined") { - channelConstructor = BroadcastChannel; - } - - return new IDBStorageEngine( - config.name, - config.version, - { - ...config.schema, - ...INTERNAL_SCHEMA, - }, - channelConstructor - ); + return new IDBStorageEngine(config.name, config.version, { + ...config.schema, + ...INTERNAL_SCHEMA, + }); } diff --git a/src/tests/EnhancedStorageEngineTransaction.test.ts b/src/tests/EnhancedStorageEngineTransaction.test.ts index f9b58bf..8e1ac4f 100644 --- a/src/tests/EnhancedStorageEngineTransaction.test.ts +++ b/src/tests/EnhancedStorageEngineTransaction.test.ts @@ -83,7 +83,7 @@ describe("EnhancedStorageEngineTransaction", () => { }); async function getTransaction() { - return storageEngine.startTransaction("ALL", "readwrite"); + return storageEngine.startTransaction(); } async function insertTodo(todo: Todo) {