hyoo_sync_client 0.0.542 → 0.0.543

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/web.mjs CHANGED
@@ -1392,12 +1392,13 @@ var $;
1392
1392
  break;
1393
1393
  }
1394
1394
  if ($mol_promise_like(result) && !handled.has(result)) {
1395
+ handled.add(result);
1395
1396
  const put = (res) => {
1396
1397
  if (this.cache === result)
1397
1398
  this.put(res);
1398
1399
  return res;
1399
1400
  };
1400
- result = result.then(put, put);
1401
+ result = Object.assign(result.then(put, put), { destructor: result.destructor });
1401
1402
  }
1402
1403
  }
1403
1404
  catch (error) {
@@ -1408,10 +1409,11 @@ var $;
1408
1409
  result = new Error(String(error), { cause: error });
1409
1410
  }
1410
1411
  if ($mol_promise_like(result) && !handled.has(result)) {
1411
- result = result.finally(() => {
1412
+ handled.add(result);
1413
+ result = Object.assign(result.finally(() => {
1412
1414
  if (this.cache === result)
1413
1415
  this.absorb();
1414
- });
1416
+ }), { destructor: result.destructor });
1415
1417
  }
1416
1418
  }
1417
1419
  if ($mol_promise_like(result) && !handled.has(result)) {