mol_jsx_lib 0.0.1090 → 0.0.1092

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/node.mjs CHANGED
@@ -1412,12 +1412,13 @@ var $;
1412
1412
  break;
1413
1413
  }
1414
1414
  if ($mol_promise_like(result) && !handled.has(result)) {
1415
+ handled.add(result);
1415
1416
  const put = (res) => {
1416
1417
  if (this.cache === result)
1417
1418
  this.put(res);
1418
1419
  return res;
1419
1420
  };
1420
- result = result.then(put, put);
1421
+ result = Object.assign(result.then(put, put), { destructor: result.destructor });
1421
1422
  }
1422
1423
  }
1423
1424
  catch (error) {
@@ -1428,10 +1429,11 @@ var $;
1428
1429
  result = new Error(String(error), { cause: error });
1429
1430
  }
1430
1431
  if ($mol_promise_like(result) && !handled.has(result)) {
1431
- result = result.finally(() => {
1432
+ handled.add(result);
1433
+ result = Object.assign(result.finally(() => {
1432
1434
  if (this.cache === result)
1433
1435
  this.absorb();
1434
- });
1436
+ }), { destructor: result.destructor });
1435
1437
  }
1436
1438
  }
1437
1439
  if ($mol_promise_like(result) && !handled.has(result)) {
package/node.test.js CHANGED
@@ -1403,12 +1403,13 @@ var $;
1403
1403
  break;
1404
1404
  }
1405
1405
  if ($mol_promise_like(result) && !handled.has(result)) {
1406
+ handled.add(result);
1406
1407
  const put = (res) => {
1407
1408
  if (this.cache === result)
1408
1409
  this.put(res);
1409
1410
  return res;
1410
1411
  };
1411
- result = result.then(put, put);
1412
+ result = Object.assign(result.then(put, put), { destructor: result.destructor });
1412
1413
  }
1413
1414
  }
1414
1415
  catch (error) {
@@ -1419,10 +1420,11 @@ var $;
1419
1420
  result = new Error(String(error), { cause: error });
1420
1421
  }
1421
1422
  if ($mol_promise_like(result) && !handled.has(result)) {
1422
- result = result.finally(() => {
1423
+ handled.add(result);
1424
+ result = Object.assign(result.finally(() => {
1423
1425
  if (this.cache === result)
1424
1426
  this.absorb();
1425
- });
1427
+ }), { destructor: result.destructor });
1426
1428
  }
1427
1429
  }
1428
1430
  if ($mol_promise_like(result) && !handled.has(result)) {