mol_wire_lib 1.0.562 → 1.0.563

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
@@ -236,6 +236,9 @@ var $;
236
236
  class $mol_wire_pub_sub extends $mol_wire_pub {
237
237
  pub_from = 0;
238
238
  cursor = $mol_wire_cursor.stale;
239
+ get temp() {
240
+ return false;
241
+ }
239
242
  get pub_list() {
240
243
  const res = [];
241
244
  const max = this.cursor >= 0 ? this.cursor : this.sub_from;
@@ -917,7 +920,7 @@ var $;
917
920
  const sub = $mol_wire_auto();
918
921
  const existen = sub?.track_next();
919
922
  reuse: if (existen) {
920
- if (existen.constructor.name !== '$mol_wire_task')
923
+ if (!existen.temp)
921
924
  break reuse;
922
925
  if (existen.host !== host)
923
926
  break reuse;
@@ -930,6 +933,9 @@ var $;
930
933
  return new $mol_wire_task(`${host?.[Symbol.toStringTag] ?? host}.${task.name}(#)`, task, host, args);
931
934
  };
932
935
  }
936
+ get temp() {
937
+ return true;
938
+ }
933
939
  complete() {
934
940
  if ($mol_promise_like(this.cache))
935
941
  return;
@@ -1169,7 +1175,7 @@ var $;
1169
1175
  return this.resync([...this.args, next]);
1170
1176
  if (!$mol_wire_fiber.warm)
1171
1177
  return this.result();
1172
- if ($mol_wire_auto()?.constructor.name === '$mol_wire_task') {
1178
+ if ($mol_wire_auto()?.temp) {
1173
1179
  return this.once();
1174
1180
  }
1175
1181
  else {
@@ -1381,7 +1387,7 @@ var $;
1381
1387
  if ((args.length === 0) || (args[0] === undefined)) {
1382
1388
  if (!$mol_wire_fiber.warm)
1383
1389
  return atom.result();
1384
- if ($mol_wire_auto()?.constructor.name === '$mol_wire_task') {
1390
+ if ($mol_wire_auto()?.temp) {
1385
1391
  return atom.once();
1386
1392
  }
1387
1393
  else {
@@ -1418,7 +1424,7 @@ var $;
1418
1424
  if ((args.length === 1) || (args[1] === undefined)) {
1419
1425
  if (!$mol_wire_fiber.warm)
1420
1426
  return atom.result();
1421
- if ($mol_wire_auto()?.constructor.name === '$mol_wire_task') {
1427
+ if ($mol_wire_auto()?.temp) {
1422
1428
  return atom.once();
1423
1429
  }
1424
1430
  else {