function fixPrimaryKey(request) {
    const onsuccess = request._cursorRequest.onsuccess;
    request._cursorRequest.onsuccess = function success(event) {
      const result = event.target.result;
      if (result) {
        event.target.result = Object.create(result, {
          primaryKey: {
            get() {
              return result.value.i;
            },
          },
          value: {
            get() {
              return result.value;
            },
            set(v) {
              result.value = v;
            },
          },
        });
      }
      return onsuccess.call(this, event);
    };
  }
// Our Mock library fails us.
Our Mock library fails us.
Our Mock library fails us .
function fixPrimaryKey(request) {
    const onsuccess = request._cursorRequest.onsuccess;
    request._cursorRequest.onsuccess = function success(event) {
      const result = event.target.result;
      if (result) {
        event.target.result = Object.create(result, {
          primaryKey: {
            get() {
              return result.value.i;
            },
          },
          value: {
            get() {
              return result.value;
            },
            set(v) {
              result.value = v;
            },
          },
        });
      }
      return onsuccess.call(this, event);
    };
  }
function fixPrimaryKey ( request ) { const onsuccess = request . _cursorRequest . onsuccess ; request . _cursorRequest . onsuccess = function success ( event ) { const result = event . target . result ; if ( result ) { event . target . result = Object . create ( result , { primaryKey : { get ( ) { return result . value . i ; } , } , value : { get ( ) { return result . value ; } , set ( v ) { result . value = v ; } , } , } ) ; } return onsuccess . call ( this , event ) ; } ; }
Our Mock library fails us.
Our Mock library fails us .