@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.cjs.js CHANGED
@@ -64102,17 +64102,14 @@ function setItem(key, value) {
64102
64102
  db = _context2.sent;
64103
64103
  txn = db.transaction(dbTable, 'readwrite');
64104
64104
  store = txn.objectStore(dbTable);
64105
- query = store.put({
64106
- key: key,
64107
- value: value && _typeof(value).toLowerCase() === 'string' ? value : JSON.stringify(value || null)
64108
- });
64105
+ query = store.put(value && _typeof(value).toLowerCase() === 'string' ? value : JSON.stringify(value || null), key);
64109
64106
 
64110
64107
  query.onsuccess = function (event) {
64111
64108
  return ok(event.target.result);
64112
64109
  };
64113
64110
 
64114
64111
  query.onerror = function (event) {
64115
- return ko(event.target.errorCode);
64112
+ return ko(event.target.error || event.target.errorCode);
64116
64113
  };
64117
64114
 
64118
64115
  txn.oncomplete = /*#__PURE__*/_asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
@@ -64166,7 +64163,7 @@ function getItem(key) {
64166
64163
  };
64167
64164
 
64168
64165
  query.onerror = function (event) {
64169
- return ko(event.target.errorCode);
64166
+ return ko(event.target.error || event.target.errorCode);
64170
64167
  };
64171
64168
 
64172
64169
  txn.oncomplete = /*#__PURE__*/_asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {