mol_jsx_lib 0.0.661 → 0.0.663

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/node.mjs CHANGED
@@ -1633,16 +1633,7 @@ var $;
1633
1633
  }
1634
1634
  if (!$mol_promise_like(this.cache))
1635
1635
  return this.cache;
1636
- await Promise.race([
1637
- this.cache,
1638
- new Promise(done => {
1639
- const sub = new $mol_wire_pub_sub;
1640
- const prev = sub.track_on();
1641
- sub.track_next(this);
1642
- sub.track_off(prev);
1643
- sub.absorb = done;
1644
- })
1645
- ]);
1636
+ await Promise.race([this.cache, this.step()]);
1646
1637
  if (!$mol_promise_like(this.cache))
1647
1638
  return this.cache;
1648
1639
  if (this.cursor === $mol_wire_cursor.final) {
@@ -1650,6 +1641,18 @@ var $;
1650
1641
  }
1651
1642
  }
1652
1643
  }
1644
+ step() {
1645
+ return new Promise(done => {
1646
+ const sub = new $mol_wire_pub_sub;
1647
+ const prev = sub.track_on();
1648
+ sub.track_next(this);
1649
+ sub.track_off(prev);
1650
+ sub.absorb = () => {
1651
+ done(null);
1652
+ sub.destructor();
1653
+ };
1654
+ });
1655
+ }
1653
1656
  }
1654
1657
  $.$mol_wire_fiber = $mol_wire_fiber;
1655
1658
  })($ || ($ = {}));
package/node.test.js CHANGED
@@ -1625,16 +1625,7 @@ var $;
1625
1625
  }
1626
1626
  if (!$mol_promise_like(this.cache))
1627
1627
  return this.cache;
1628
- await Promise.race([
1629
- this.cache,
1630
- new Promise(done => {
1631
- const sub = new $mol_wire_pub_sub;
1632
- const prev = sub.track_on();
1633
- sub.track_next(this);
1634
- sub.track_off(prev);
1635
- sub.absorb = done;
1636
- })
1637
- ]);
1628
+ await Promise.race([this.cache, this.step()]);
1638
1629
  if (!$mol_promise_like(this.cache))
1639
1630
  return this.cache;
1640
1631
  if (this.cursor === $mol_wire_cursor.final) {
@@ -1642,6 +1633,18 @@ var $;
1642
1633
  }
1643
1634
  }
1644
1635
  }
1636
+ step() {
1637
+ return new Promise(done => {
1638
+ const sub = new $mol_wire_pub_sub;
1639
+ const prev = sub.track_on();
1640
+ sub.track_next(this);
1641
+ sub.track_off(prev);
1642
+ sub.absorb = () => {
1643
+ done(null);
1644
+ sub.destructor();
1645
+ };
1646
+ });
1647
+ }
1645
1648
  }
1646
1649
  $.$mol_wire_fiber = $mol_wire_fiber;
1647
1650
  })($ || ($ = {}));