@bbn/bbn 2.0.234 → 2.0.235

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/db.js CHANGED
@@ -90,7 +90,7 @@ class DbObject {
90
90
  return __awaiter(this, arguments, void 0, function* (database = '') {
91
91
  let conn = db._connections[database || this.dbName];
92
92
  if (!conn) {
93
- const tmp = yield db.open(database || this.dbName);
93
+ yield db.open(database || this.dbName);
94
94
  if (!db._connections[database || this.dbName]) {
95
95
  throw new Error(_('The database %s is not open', this.dbName));
96
96
  }
@@ -426,7 +426,7 @@ const db = {
426
426
  if (!this._structures[database]) {
427
427
  throw new Error(_('Impossible to find a structure for the database %s', database));
428
428
  }
429
- if (this._objects[database]) {
429
+ if (this._objects[database] && this._connections[database]) {
430
430
  return this._objects[database];
431
431
  }
432
432
  yield new Promise((resolve, reject) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.234",
3
+ "version": "2.0.235",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",