Fix cloning embedded signatures
This commit is contained in:
parent
67de70fa01
commit
1071cb9bca
|
@ -226,11 +226,15 @@ List.prototype.concat = function (packetlist) {
|
||||||
List.fromStructuredClone = function(packetlistClone) {
|
List.fromStructuredClone = function(packetlistClone) {
|
||||||
const packetlist = new List();
|
const packetlist = new List();
|
||||||
for (let i = 0; i < packetlistClone.length; i++) {
|
for (let i = 0; i < packetlistClone.length; i++) {
|
||||||
packetlist.push(packets.fromStructuredClone(packetlistClone[i]));
|
const packet = packets.fromStructuredClone(packetlistClone[i]);
|
||||||
if (packetlist[i].packets.length !== 0) {
|
packetlist.push(packet);
|
||||||
packetlist[i].packets = this.fromStructuredClone(packetlist[i].packets);
|
if (packet.embeddedSignature) {
|
||||||
|
packet.embeddedSignature = packets.fromStructuredClone(packet.embeddedSignature);
|
||||||
|
}
|
||||||
|
if (packet.packets.length !== 0) {
|
||||||
|
packet.packets = this.fromStructuredClone(packet.packets);
|
||||||
} else {
|
} else {
|
||||||
packetlist[i].packets = new List();
|
packet.packets = new List();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return packetlist;
|
return packetlist;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user