mol_plot_all 1.2.1514 → 1.2.1516

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
@@ -1157,10 +1157,12 @@ var $;
1157
1157
  result = wrappers.get(result);
1158
1158
  }
1159
1159
  else {
1160
- wrappers.set(result, result = Object.assign(result.finally(() => {
1160
+ const put = (v) => {
1161
1161
  if (this.cache === result)
1162
1162
  this.absorb();
1163
- }), { destructor: result.destructor || (() => { }) }));
1163
+ return v;
1164
+ };
1165
+ wrappers.set(result, result = Object.assign(result.then(put, put), { destructor: result.destructor || (() => { }) }));
1164
1166
  const error = new Error(`Promise in ${this}`);
1165
1167
  Object.defineProperty(result, 'stack', { get: () => error.stack });
1166
1168
  }
@@ -1754,6 +1756,12 @@ var $;
1754
1756
  $mol_wire_atom.watching.add(this);
1755
1757
  }
1756
1758
  resync(args) {
1759
+ for (let cursor = this.pub_from; cursor < this.sub_from; cursor += 2) {
1760
+ const pub = this.data[cursor];
1761
+ if (pub && pub instanceof $mol_wire_task) {
1762
+ pub.destructor();
1763
+ }
1764
+ }
1757
1765
  return this.put(this.task.call(this.host, ...args));
1758
1766
  }
1759
1767
  once() {