mol_key 0.0.1068 → 0.0.1069

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
@@ -2120,12 +2120,13 @@ var $;
2120
2120
  break;
2121
2121
  }
2122
2122
  if ($mol_promise_like(result) && !handled.has(result)) {
2123
+ handled.add(result);
2123
2124
  const put = (res) => {
2124
2125
  if (this.cache === result)
2125
2126
  this.put(res);
2126
2127
  return res;
2127
2128
  };
2128
- result = result.then(put, put);
2129
+ result = Object.assign(result.then(put, put), { destructor: result.destructor });
2129
2130
  }
2130
2131
  }
2131
2132
  catch (error) {
@@ -2136,10 +2137,11 @@ var $;
2136
2137
  result = new Error(String(error), { cause: error });
2137
2138
  }
2138
2139
  if ($mol_promise_like(result) && !handled.has(result)) {
2139
- result = result.finally(() => {
2140
+ handled.add(result);
2141
+ result = Object.assign(result.finally(() => {
2140
2142
  if (this.cache === result)
2141
2143
  this.absorb();
2142
- });
2144
+ }), { destructor: result.destructor });
2143
2145
  }
2144
2146
  }
2145
2147
  if ($mol_promise_like(result) && !handled.has(result)) {