@ethereansos/interfaces-core 0.4.147 → 0.4.148

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.esm.js CHANGED
@@ -64090,17 +64090,14 @@ function setItem(key, value) {
64090
64090
  db = _context2.sent;
64091
64091
  txn = db.transaction(dbTable, 'readwrite');
64092
64092
  store = txn.objectStore(dbTable);
64093
- query = store.put({
64094
- key: key,
64095
- value: value && _typeof(value).toLowerCase() === 'string' ? value : JSON.stringify(value || null)
64096
- });
64093
+ query = store.put(value && _typeof(value).toLowerCase() === 'string' ? value : JSON.stringify(value || null), key);
64097
64094
 
64098
64095
  query.onsuccess = function (event) {
64099
64096
  return ok(event.target.result);
64100
64097
  };
64101
64098
 
64102
64099
  query.onerror = function (event) {
64103
- return ko(event.target.errorCode);
64100
+ return ko(event.target.error || event.target.errorCode);
64104
64101
  };
64105
64102
 
64106
64103
  txn.oncomplete = /*#__PURE__*/_asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
@@ -64154,7 +64151,7 @@ function getItem(key) {
64154
64151
  };
64155
64152
 
64156
64153
  query.onerror = function (event) {
64157
- return ko(event.target.errorCode);
64154
+ return ko(event.target.error || event.target.errorCode);
64158
64155
  };
64159
64156
 
64160
64157
  txn.oncomplete = /*#__PURE__*/_asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {