mol_jsx_lib 0.0.833 → 0.0.835

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mol_jsx_lib",
3
- "version": "0.0.833",
3
+ "version": "0.0.835",
4
4
  "exports": {
5
5
  "node": {
6
6
  "import": "./node.mjs",
package/web.js CHANGED
@@ -983,16 +983,13 @@ var $;
983
983
  result = this.task.call(this.host, ...this.args);
984
984
  break;
985
985
  }
986
- if ($mol_promise_like(result)) {
986
+ if ($mol_promise_like(result) && !handled.has(result)) {
987
987
  const put = (res) => {
988
988
  if (this.cache === result)
989
989
  this.put(res);
990
990
  return res;
991
991
  };
992
- result = Object.assign(result.then(put, put), {
993
- destructor: result['destructor'] ?? (() => { })
994
- });
995
- handled.add(result);
992
+ result = result.then(put, put);
996
993
  }
997
994
  }
998
995
  catch (error) {
@@ -1003,15 +1000,20 @@ var $;
1003
1000
  result = new Error(String(error), { cause: error });
1004
1001
  }
1005
1002
  if ($mol_promise_like(result) && !handled.has(result)) {
1006
- result = Object.assign(result.finally(() => {
1003
+ result = result.finally(() => {
1007
1004
  if (this.cache === result)
1008
1005
  this.absorb();
1009
- }), {
1010
- destructor: result['destructor'] ?? (() => { })
1011
1006
  });
1012
- handled.add(result);
1013
1007
  }
1014
1008
  }
1009
+ if ($mol_promise_like(result) && !handled.has(result)) {
1010
+ result = Object.assign(result, {
1011
+ destructor: result['destructor'] ?? (() => { })
1012
+ });
1013
+ handled.add(result);
1014
+ const error = new Error();
1015
+ Object.defineProperty(result, 'stack', { get: () => error.stack });
1016
+ }
1015
1017
  if (!$mol_promise_like(result)) {
1016
1018
  this.track_cut();
1017
1019
  }