@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/bbn.js +1 -1
- package/dist/bbn.js.map +1 -1
- package/dist/bbn.sw.js +1 -1
- package/dist/bbn.sw.js.map +1 -1
- package/dist/db.js +2 -2
- package/package.json +1 -1
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
|
-
|
|
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) => {
|