@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aegis-framework/artemis",
3
- "version": "0.3.25",
3
+ "version": "0.3.26",
4
4
  "description": "Aegis Framework Javascript Library",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/artemis.js",
@@ -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) => {resolve (event.target.result);});
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
  });