mol_wire_lib 1.0.490 → 1.0.492

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
@@ -1116,8 +1116,9 @@ var $;
1116
1116
  return fiber;
1117
1117
  }
1118
1118
  static watching = new Set();
1119
+ static watcher = null;
1119
1120
  static watch() {
1120
- new $mol_after_frame($mol_wire_atom.watch);
1121
+ $mol_wire_atom.watcher = new $mol_after_frame($mol_wire_atom.watch);
1121
1122
  for (const atom of $mol_wire_atom.watching) {
1122
1123
  if (atom.cursor === $mol_wire_cursor.final) {
1123
1124
  $mol_wire_atom.watching.delete(atom);
@@ -1129,6 +1130,9 @@ var $;
1129
1130
  }
1130
1131
  }
1131
1132
  watch() {
1133
+ if (!$mol_wire_atom.watcher) {
1134
+ $mol_wire_atom.watcher = new $mol_after_frame($mol_wire_atom.watch);
1135
+ }
1132
1136
  $mol_wire_atom.watching.add(this);
1133
1137
  }
1134
1138
  resync(args) {
@@ -1205,7 +1209,6 @@ var $;
1205
1209
  $mol_wire_method
1206
1210
  ], $mol_wire_atom.prototype, "once", null);
1207
1211
  $.$mol_wire_atom = $mol_wire_atom;
1208
- $mol_wire_atom.watch();
1209
1212
  })($ || ($ = {}));
1210
1213
  //mol/wire/atom/atom.ts
1211
1214
  ;