mol_tree2 1.0.1116 → 1.0.1118
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 +13 -2
- package/node.test.js.map +1 -1
- package/package.json +1 -1
package/node.test.js
CHANGED
|
@@ -3062,7 +3062,7 @@ var $;
|
|
|
3062
3062
|
emit(quant = $mol_wire_cursor.stale) {
|
|
3063
3063
|
for (let i = this.sub_from; i < this.data.length; i += 2) {
|
|
3064
3064
|
;
|
|
3065
|
-
this.data[i].absorb(quant);
|
|
3065
|
+
this.data[i].absorb(quant, this.data[i + 1]);
|
|
3066
3066
|
}
|
|
3067
3067
|
}
|
|
3068
3068
|
peer_move(from_pos, to_pos) {
|
|
@@ -3313,13 +3313,24 @@ var $;
|
|
|
3313
3313
|
pub?.complete();
|
|
3314
3314
|
}
|
|
3315
3315
|
}
|
|
3316
|
-
absorb(quant = $mol_wire_cursor.stale) {
|
|
3316
|
+
absorb(quant = $mol_wire_cursor.stale, pos = -1) {
|
|
3317
3317
|
if (this.cursor === $mol_wire_cursor.final)
|
|
3318
3318
|
return;
|
|
3319
3319
|
if (this.cursor >= quant)
|
|
3320
3320
|
return;
|
|
3321
3321
|
this.cursor = quant;
|
|
3322
3322
|
this.emit($mol_wire_cursor.doubt);
|
|
3323
|
+
if (pos >= 0 && pos < this.sub_from - 2) {
|
|
3324
|
+
const pub = this.data[pos];
|
|
3325
|
+
if (pub instanceof $mol_wire_task)
|
|
3326
|
+
return;
|
|
3327
|
+
for (let cursor = this.pub_from; cursor < this.sub_from; cursor += 2) {
|
|
3328
|
+
const pub = this.data[cursor];
|
|
3329
|
+
if (pub instanceof $mol_wire_task) {
|
|
3330
|
+
pub.destructor();
|
|
3331
|
+
}
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3323
3334
|
}
|
|
3324
3335
|
[$mol_dev_format_head]() {
|
|
3325
3336
|
return $mol_dev_format_native(this);
|