mol_jsx_lib 0.0.1090 → 0.0.1092

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
@@ -977,12 +977,13 @@ var $;
977
977
  break;
978
978
  }
979
979
  if ($mol_promise_like(result) && !handled.has(result)) {
980
+ handled.add(result);
980
981
  const put = (res) => {
981
982
  if (this.cache === result)
982
983
  this.put(res);
983
984
  return res;
984
985
  };
985
- result = result.then(put, put);
986
+ result = Object.assign(result.then(put, put), { destructor: result.destructor });
986
987
  }
987
988
  }
988
989
  catch (error) {
@@ -993,10 +994,11 @@ var $;
993
994
  result = new Error(String(error), { cause: error });
994
995
  }
995
996
  if ($mol_promise_like(result) && !handled.has(result)) {
996
- result = result.finally(() => {
997
+ handled.add(result);
998
+ result = Object.assign(result.finally(() => {
997
999
  if (this.cache === result)
998
1000
  this.absorb();
999
- });
1001
+ }), { destructor: result.destructor });
1000
1002
  }
1001
1003
  }
1002
1004
  if ($mol_promise_like(result) && !handled.has(result)) {