@rotorsoft/act 1.31.4 → 1.31.5

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/dist/index.cjs CHANGED
@@ -1613,10 +1613,17 @@ function current_ports() {
1613
1613
  return scoped.getStore();
1614
1614
  }
1615
1615
  function run_reacting(event, fn) {
1616
- return reacting.run(event, fn);
1616
+ const box = { event };
1617
+ return reacting.run(box, async () => {
1618
+ try {
1619
+ return await fn();
1620
+ } finally {
1621
+ box.event = void 0;
1622
+ }
1623
+ });
1617
1624
  }
1618
1625
  function current_reacting() {
1619
- return reacting.getStore();
1626
+ return reacting.getStore()?.event;
1620
1627
  }
1621
1628
  function make_reaction_scope(app) {
1622
1629
  return { app, run: run_reacting };