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.test.js CHANGED
@@ -1108,8 +1108,9 @@ var $;
1108
1108
  return fiber;
1109
1109
  }
1110
1110
  static watching = new Set();
1111
+ static watcher = null;
1111
1112
  static watch() {
1112
- new $mol_after_frame($mol_wire_atom.watch);
1113
+ $mol_wire_atom.watcher = new $mol_after_frame($mol_wire_atom.watch);
1113
1114
  for (const atom of $mol_wire_atom.watching) {
1114
1115
  if (atom.cursor === $mol_wire_cursor.final) {
1115
1116
  $mol_wire_atom.watching.delete(atom);
@@ -1121,6 +1122,9 @@ var $;
1121
1122
  }
1122
1123
  }
1123
1124
  watch() {
1125
+ if (!$mol_wire_atom.watcher) {
1126
+ $mol_wire_atom.watcher = new $mol_after_frame($mol_wire_atom.watch);
1127
+ }
1124
1128
  $mol_wire_atom.watching.add(this);
1125
1129
  }
1126
1130
  resync(args) {
@@ -1197,7 +1201,6 @@ var $;
1197
1201
  $mol_wire_method
1198
1202
  ], $mol_wire_atom.prototype, "once", null);
1199
1203
  $.$mol_wire_atom = $mol_wire_atom;
1200
- $mol_wire_atom.watch();
1201
1204
  })($ || ($ = {}));
1202
1205
  //mol/wire/atom/atom.ts
1203
1206
  ;