Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
litcodeur committed Feb 21, 2024
1 parent 989323e commit cb7b283
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
20 changes: 4 additions & 16 deletions src/StorageEngineFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TDatabaseSchema>(
config.name,
config.version,
{
...config.schema,
...INTERNAL_SCHEMA,
},
channelConstructor
);
return new IDBStorageEngine<TDatabaseSchema>(config.name, config.version, {
...config.schema,
...INTERNAL_SCHEMA,
});
}
2 changes: 1 addition & 1 deletion src/tests/EnhancedStorageEngineTransaction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe("EnhancedStorageEngineTransaction", () => {
});

async function getTransaction() {
return storageEngine.startTransaction("ALL", "readwrite");
return storageEngine.startTransaction();
}

async function insertTodo(todo: Todo) {
Expand Down

0 comments on commit cb7b283

Please sign in to comment.