mol_wire_lib 1.0.1224 → 1.0.1225

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/web.mjs CHANGED
@@ -754,12 +754,13 @@ var $;
754
754
  break;
755
755
  }
756
756
  if ($mol_promise_like(result) && !handled.has(result)) {
757
+ handled.add(result);
757
758
  const put = (res) => {
758
759
  if (this.cache === result)
759
760
  this.put(res);
760
761
  return res;
761
762
  };
762
- result = result.then(put, put);
763
+ result = Object.assign(result.then(put, put), { destructor: result.destructor });
763
764
  }
764
765
  }
765
766
  catch (error) {
@@ -770,10 +771,11 @@ var $;
770
771
  result = new Error(String(error), { cause: error });
771
772
  }
772
773
  if ($mol_promise_like(result) && !handled.has(result)) {
773
- result = result.finally(() => {
774
+ handled.add(result);
775
+ result = Object.assign(result.finally(() => {
774
776
  if (this.cache === result)
775
777
  this.absorb();
776
- });
778
+ }), { destructor: result.destructor });
777
779
  }
778
780
  }
779
781
  if ($mol_promise_like(result) && !handled.has(result)) {