@aegis-framework/artemis 0.3.25 → 0.3.26
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/artemis.js +1 -1
- package/dist/artemis.js.map +1 -1
- package/dist/artemis.min.js +1 -1
- package/dist/artemis.min.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/SpaceAdapter/IndexedDB.js +9 -2
package/package.json
CHANGED
|
@@ -90,7 +90,7 @@ export class IndexedDB {
|
|
|
90
90
|
} else {
|
|
91
91
|
// Check what upgrade functions have been declared in their respective order
|
|
92
92
|
const availableUpgrades = Object.keys (this.upgrades).sort ();
|
|
93
|
-
|
|
93
|
+
|
|
94
94
|
// Find the first update that needs to be applied to the database given
|
|
95
95
|
// the old version it currently has.
|
|
96
96
|
const startFrom = availableUpgrades.findIndex (u => {
|
|
@@ -187,7 +187,14 @@ export class IndexedDB {
|
|
|
187
187
|
const transaction = this.storage.transaction (this.store).objectStore (this.store);
|
|
188
188
|
const op = transaction.get (key);
|
|
189
189
|
|
|
190
|
-
op.addEventListener ('success', (event) => {
|
|
190
|
+
op.addEventListener ('success', (event) => {
|
|
191
|
+
const value = event.target.result;
|
|
192
|
+
if (typeof value !== 'undefined' && value !== null) {
|
|
193
|
+
resolve (value);
|
|
194
|
+
} else {
|
|
195
|
+
reject ();
|
|
196
|
+
}
|
|
197
|
+
});
|
|
191
198
|
op.addEventListener ('error', (event) => {reject (event);});
|
|
192
199
|
});
|
|
193
200
|
});
|