mol_tree2 1.0.897 → 1.0.899

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
@@ -4335,12 +4335,13 @@ var $;
4335
4335
  break;
4336
4336
  }
4337
4337
  if ($mol_promise_like(result) && !handled.has(result)) {
4338
+ handled.add(result);
4338
4339
  const put = (res) => {
4339
4340
  if (this.cache === result)
4340
4341
  this.put(res);
4341
4342
  return res;
4342
4343
  };
4343
- result = result.then(put, put);
4344
+ result = Object.assign(result.then(put, put), { destructor: result.destructor });
4344
4345
  }
4345
4346
  }
4346
4347
  catch (error) {
@@ -4351,10 +4352,11 @@ var $;
4351
4352
  result = new Error(String(error), { cause: error });
4352
4353
  }
4353
4354
  if ($mol_promise_like(result) && !handled.has(result)) {
4354
- result = result.finally(() => {
4355
+ handled.add(result);
4356
+ result = Object.assign(result.finally(() => {
4355
4357
  if (this.cache === result)
4356
4358
  this.absorb();
4357
- });
4359
+ }), { destructor: result.destructor });
4358
4360
  }
4359
4361
  }
4360
4362
  if ($mol_promise_like(result) && !handled.has(result)) {