mol_mutable 0.0.941 → 0.0.943
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
|
@@ -659,7 +659,7 @@ var $;
|
|
|
659
659
|
emit(quant = $mol_wire_cursor.stale) {
|
|
660
660
|
for (let i = this.sub_from; i < this.data.length; i += 2) {
|
|
661
661
|
;
|
|
662
|
-
this.data[i].absorb(quant);
|
|
662
|
+
this.data[i].absorb(quant, this.data[i + 1]);
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
peer_move(from_pos, to_pos) {
|
|
@@ -910,13 +910,24 @@ var $;
|
|
|
910
910
|
pub?.complete();
|
|
911
911
|
}
|
|
912
912
|
}
|
|
913
|
-
absorb(quant = $mol_wire_cursor.stale) {
|
|
913
|
+
absorb(quant = $mol_wire_cursor.stale, pos = -1) {
|
|
914
914
|
if (this.cursor === $mol_wire_cursor.final)
|
|
915
915
|
return;
|
|
916
916
|
if (this.cursor >= quant)
|
|
917
917
|
return;
|
|
918
918
|
this.cursor = quant;
|
|
919
919
|
this.emit($mol_wire_cursor.doubt);
|
|
920
|
+
if (pos >= 0 && pos < this.sub_from - 2) {
|
|
921
|
+
const pub = this.data[pos];
|
|
922
|
+
if (pub instanceof $mol_wire_task)
|
|
923
|
+
return;
|
|
924
|
+
for (let cursor = this.pub_from; cursor < this.sub_from; cursor += 2) {
|
|
925
|
+
const pub = this.data[cursor];
|
|
926
|
+
if (pub instanceof $mol_wire_task) {
|
|
927
|
+
pub.destructor();
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
}
|
|
920
931
|
}
|
|
921
932
|
[$mol_dev_format_head]() {
|
|
922
933
|
return $mol_dev_format_native(this);
|