fix: need to use Object.entries

This commit is contained in:
Derrick Hammer 2023-11-18 06:44:13 -05:00
parent 6e589cbe64
commit c1f471e921
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 9 additions and 1 deletions

View File

@ -161,7 +161,15 @@ export class S5Node {
const innerMapLength = unpacker.unpackMapLength(); const innerMapLength = unpacker.unpackMapLength();
for (let j = 0; j < innerMapLength; j++) { for (let j = 0; j < innerMapLength; j++) {
const nodeId = new NodeId(unpacker.unpackBinary()); const nodeId = new NodeId(unpacker.unpackBinary());
innerMap.set(nodeId, new Map(unpacker.unpackMap() as [number, any][])); innerMap.set(
nodeId,
new Map(
Object.entries(unpacker.unpackMap()).map(([key, value]) => [
Number(key),
value,
]),
),
);
} }
} }
return map; return map;