@bbn/bbn 1.0.377 → 1.0.378
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/db.js +11 -1
- package/package.json +1 -1
package/dist/db.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
1
10
|
import _ from './_.js';
|
|
2
11
|
import each from './fn/loop/each.js';
|
|
3
12
|
import iterate from './fn/loop/iterate.js';
|
|
@@ -224,7 +233,8 @@ var db = {
|
|
|
224
233
|
if (!db._structures[name]) {
|
|
225
234
|
throw new Error(_("Impossible to find a structure for the database %s", name));
|
|
226
235
|
}
|
|
227
|
-
var
|
|
236
|
+
var num = Math.max.apply(Math, __spreadArray([1], Object.keys(db._structures[name]).map(function (a) { return db._structures[name][a].num || 1; }), false));
|
|
237
|
+
var conn_1 = idb.open(name, num);
|
|
228
238
|
conn_1.onupgradeneeded = function () {
|
|
229
239
|
log("UPGRADE NEEDED");
|
|
230
240
|
var res = conn_1.result;
|