mol_wire_lib 1.0.185 → 1.0.188

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.js CHANGED
@@ -1193,6 +1193,8 @@ var $;
1193
1193
  var $;
1194
1194
  (function ($) {
1195
1195
  function $mol_wire_async(obj) {
1196
+ let fiber;
1197
+ const temp = $mol_wire_task.getter(obj);
1196
1198
  return new Proxy(obj, {
1197
1199
  get(obj, field) {
1198
1200
  const val = obj[field];
@@ -1207,8 +1209,8 @@ var $;
1207
1209
  };
1208
1210
  },
1209
1211
  apply(obj, self, args) {
1210
- const temp = $mol_wire_task.getter(obj);
1211
- const fiber = temp(self, args);
1212
+ fiber?.destructor();
1213
+ fiber = temp(self, args);
1212
1214
  return fiber.async();
1213
1215
  },
1214
1216
  });