Skip to content

Commit

Permalink
move lock set inside try
Browse files Browse the repository at this point in the history
  • Loading branch information
grod220 committed Aug 26, 2024
1 parent 664fc2a commit f08f93a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions apps/extension/src/storage/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,8 @@ export class ExtensionStorage<T extends { dbVersion: number }> {
await this.dbLock;
}

this.dbLock = this.migrateOrInitializeIfNeeded();

try {
this.dbLock = this.migrateOrInitializeIfNeeded();
await this.dbLock;
return await fn();
} finally {
Expand Down

0 comments on commit f08f93a

Please sign in to comment.