@ztimson/utils 0.26.21 → 0.26.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1110,9 +1110,9 @@ class Database {
1110
1110
  if (!this.includes(table.name)) {
1111
1111
  const newDb = new Database(this.database, [...this.tables, table], (this.version ?? 0) + 1);
1112
1112
  conn.close();
1113
- await newDb.connection;
1114
- Object.assign(this, newDb);
1113
+ this.connection = newDb.connection;
1115
1114
  await this.connection;
1115
+ Object.assign(this, newDb);
1116
1116
  }
1117
1117
  return this.table(table.name);
1118
1118
  });
@@ -1124,9 +1124,9 @@ class Database {
1124
1124
  const conn = await this.connection;
1125
1125
  const newDb = new Database(this.database, this.tables.filter((t) => t.name != table.name), (this.version ?? 0) + 1);
1126
1126
  conn.close();
1127
- await newDb.connection;
1128
- Object.assign(this, newDb);
1127
+ this.connection = newDb.connection;
1129
1128
  await this.connection;
1129
+ Object.assign(this, newDb);
1130
1130
  });
1131
1131
  }
1132
1132
  includes(name) {