mol_mutable 0.0.728 → 0.0.729

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
@@ -1260,12 +1260,13 @@ var $;
1260
1260
  break;
1261
1261
  }
1262
1262
  if ($mol_promise_like(result) && !handled.has(result)) {
1263
+ handled.add(result);
1263
1264
  const put = (res) => {
1264
1265
  if (this.cache === result)
1265
1266
  this.put(res);
1266
1267
  return res;
1267
1268
  };
1268
- result = result.then(put, put);
1269
+ result = Object.assign(result.then(put, put), { destructor: result.destructor });
1269
1270
  }
1270
1271
  }
1271
1272
  catch (error) {
@@ -1276,10 +1277,11 @@ var $;
1276
1277
  result = new Error(String(error), { cause: error });
1277
1278
  }
1278
1279
  if ($mol_promise_like(result) && !handled.has(result)) {
1279
- result = result.finally(() => {
1280
+ handled.add(result);
1281
+ result = Object.assign(result.finally(() => {
1280
1282
  if (this.cache === result)
1281
1283
  this.absorb();
1282
- });
1284
+ }), { destructor: result.destructor });
1283
1285
  }
1284
1286
  }
1285
1287
  if ($mol_promise_like(result) && !handled.has(result)) {