mol_plot_all 1.2.960 → 1.2.962

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.js CHANGED
@@ -780,16 +780,13 @@ var $;
780
780
  result = this.task.call(this.host, ...this.args);
781
781
  break;
782
782
  }
783
- if ($mol_promise_like(result)) {
783
+ if ($mol_promise_like(result) && !handled.has(result)) {
784
784
  const put = (res) => {
785
785
  if (this.cache === result)
786
786
  this.put(res);
787
787
  return res;
788
788
  };
789
- result = Object.assign(result.then(put, put), {
790
- destructor: result['destructor'] ?? (() => { })
791
- });
792
- handled.add(result);
789
+ result = result.then(put, put);
793
790
  }
794
791
  }
795
792
  catch (error) {
@@ -800,15 +797,20 @@ var $;
800
797
  result = new Error(String(error), { cause: error });
801
798
  }
802
799
  if ($mol_promise_like(result) && !handled.has(result)) {
803
- result = Object.assign(result.finally(() => {
800
+ result = result.finally(() => {
804
801
  if (this.cache === result)
805
802
  this.absorb();
806
- }), {
807
- destructor: result['destructor'] ?? (() => { })
808
803
  });
809
- handled.add(result);
810
804
  }
811
805
  }
806
+ if ($mol_promise_like(result) && !handled.has(result)) {
807
+ result = Object.assign(result, {
808
+ destructor: result['destructor'] ?? (() => { })
809
+ });
810
+ handled.add(result);
811
+ const error = new Error();
812
+ Object.defineProperty(result, 'stack', { get: () => error.stack });
813
+ }
812
814
  if (!$mol_promise_like(result)) {
813
815
  this.track_cut();
814
816
  }
@@ -2062,10 +2064,10 @@ var $;
2062
2064
  "use strict";
2063
2065
  var $;
2064
2066
  (function ($) {
2065
- function $mol_style_prop(prefix, postfixes) {
2066
- const record = postfixes.reduce((record_obj, postfix) => {
2067
- record_obj[postfix] = $mol_style_func.vary(`--${prefix}_${postfix}`);
2068
- return record_obj;
2067
+ function $mol_style_prop(prefix, keys) {
2068
+ const record = keys.reduce((rec, key) => {
2069
+ rec[key] = $mol_style_func.vary(`--${prefix}_${key}`);
2070
+ return rec;
2069
2071
  }, {});
2070
2072
  return record;
2071
2073
  }