mol_data_all 1.1.1507 → 1.1.1509

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
@@ -1120,7 +1120,7 @@ var $;
1120
1120
  emit(quant = $mol_wire_cursor.stale) {
1121
1121
  for (let i = this.sub_from; i < this.data.length; i += 2) {
1122
1122
  ;
1123
- this.data[i].absorb(quant);
1123
+ this.data[i].absorb(quant, this.data[i + 1]);
1124
1124
  }
1125
1125
  }
1126
1126
  peer_move(from_pos, to_pos) {
@@ -1371,13 +1371,24 @@ var $;
1371
1371
  pub?.complete();
1372
1372
  }
1373
1373
  }
1374
- absorb(quant = $mol_wire_cursor.stale) {
1374
+ absorb(quant = $mol_wire_cursor.stale, pos = -1) {
1375
1375
  if (this.cursor === $mol_wire_cursor.final)
1376
1376
  return;
1377
1377
  if (this.cursor >= quant)
1378
1378
  return;
1379
1379
  this.cursor = quant;
1380
1380
  this.emit($mol_wire_cursor.doubt);
1381
+ if (pos >= 0 && pos < this.sub_from - 2) {
1382
+ const pub = this.data[pos];
1383
+ if (pub instanceof $mol_wire_task)
1384
+ return;
1385
+ for (let cursor = this.pub_from; cursor < this.sub_from; cursor += 2) {
1386
+ const pub = this.data[cursor];
1387
+ if (pub instanceof $mol_wire_task) {
1388
+ pub.destructor();
1389
+ }
1390
+ }
1391
+ }
1381
1392
  }
1382
1393
  [$mol_dev_format_head]() {
1383
1394
  return $mol_dev_format_native(this);