mol_regexp 0.0.1348 → 0.0.1350

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.test.js CHANGED
@@ -1525,12 +1525,13 @@ var $;
1525
1525
  break;
1526
1526
  }
1527
1527
  if ($mol_promise_like(result) && !handled.has(result)) {
1528
+ handled.add(result);
1528
1529
  const put = (res) => {
1529
1530
  if (this.cache === result)
1530
1531
  this.put(res);
1531
1532
  return res;
1532
1533
  };
1533
- result = result.then(put, put);
1534
+ result = Object.assign(result.then(put, put), { destructor: result.destructor });
1534
1535
  }
1535
1536
  }
1536
1537
  catch (error) {
@@ -1541,10 +1542,11 @@ var $;
1541
1542
  result = new Error(String(error), { cause: error });
1542
1543
  }
1543
1544
  if ($mol_promise_like(result) && !handled.has(result)) {
1544
- result = result.finally(() => {
1545
+ handled.add(result);
1546
+ result = Object.assign(result.finally(() => {
1545
1547
  if (this.cache === result)
1546
1548
  this.absorb();
1547
- });
1549
+ }), { destructor: result.destructor });
1548
1550
  }
1549
1551
  }
1550
1552
  if ($mol_promise_like(result) && !handled.has(result)) {