Skip to content

Commit

Permalink
Revert db change
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmaa committed Dec 16, 2024
1 parent a15be19 commit e733bff
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ext/js/data/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class Database {
/**
* @param {string} databaseName
* @param {number} version
* @param {import('database').StructureDefinition<TObjectStoreName>[]?} structure
* @param {import('database').StructureDefinition<TObjectStoreName>[]} structure
*/
async open(databaseName, version, structure) {
if (this._db !== null) {
Expand All @@ -43,9 +43,7 @@ export class Database {
try {
this._isOpening = true;
this._db = await this._open(databaseName, version, (db, transaction, oldVersion) => {
if (structure !== null) {
this._upgrade(db, transaction, oldVersion, structure);
}
this._upgrade(db, transaction, oldVersion, structure);
});
} finally {
this._isOpening = false;
Expand Down

0 comments on commit e733bff

Please sign in to comment.