mol_tree2 1.0.649 → 1.0.651

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_tree2",
3
- "version": "1.0.649",
3
+ "version": "1.0.651",
4
4
  "exports": {
5
5
  "node": {
6
6
  "import": "./node.mjs",
package/web.test.js CHANGED
@@ -2418,16 +2418,13 @@ var $;
2418
2418
  result = this.task.call(this.host, ...this.args);
2419
2419
  break;
2420
2420
  }
2421
- if ($mol_promise_like(result)) {
2421
+ if ($mol_promise_like(result) && !handled.has(result)) {
2422
2422
  const put = (res) => {
2423
2423
  if (this.cache === result)
2424
2424
  this.put(res);
2425
2425
  return res;
2426
2426
  };
2427
- result = Object.assign(result.then(put, put), {
2428
- destructor: result['destructor'] ?? (() => { })
2429
- });
2430
- handled.add(result);
2427
+ result = result.then(put, put);
2431
2428
  }
2432
2429
  }
2433
2430
  catch (error) {
@@ -2438,15 +2435,20 @@ var $;
2438
2435
  result = new Error(String(error), { cause: error });
2439
2436
  }
2440
2437
  if ($mol_promise_like(result) && !handled.has(result)) {
2441
- result = Object.assign(result.finally(() => {
2438
+ result = result.finally(() => {
2442
2439
  if (this.cache === result)
2443
2440
  this.absorb();
2444
- }), {
2445
- destructor: result['destructor'] ?? (() => { })
2446
2441
  });
2447
- handled.add(result);
2448
2442
  }
2449
2443
  }
2444
+ if ($mol_promise_like(result) && !handled.has(result)) {
2445
+ result = Object.assign(result, {
2446
+ destructor: result['destructor'] ?? (() => { })
2447
+ });
2448
+ handled.add(result);
2449
+ const error = new Error();
2450
+ Object.defineProperty(result, 'stack', { get: () => error.stack });
2451
+ }
2450
2452
  if (!$mol_promise_like(result)) {
2451
2453
  this.track_cut();
2452
2454
  }
@@ -4607,10 +4609,10 @@ var $;
4607
4609
  "use strict";
4608
4610
  var $;
4609
4611
  (function ($) {
4610
- function $mol_style_prop(prefix, postfixes) {
4611
- const record = postfixes.reduce((record_obj, postfix) => {
4612
- record_obj[postfix] = $mol_style_func.vary(`--${prefix}_${postfix}`);
4613
- return record_obj;
4612
+ function $mol_style_prop(prefix, keys) {
4613
+ const record = keys.reduce((rec, key) => {
4614
+ rec[key] = $mol_style_func.vary(`--${prefix}_${key}`);
4615
+ return rec;
4614
4616
  }, {});
4615
4617
  return record;
4616
4618
  }