fix: need to use Object.entries
This commit is contained in:
parent
6e589cbe64
commit
c1f471e921
10
src/node.ts
10
src/node.ts
|
@ -161,7 +161,15 @@ export class S5Node {
|
|||
const innerMapLength = unpacker.unpackMapLength();
|
||||
for (let j = 0; j < innerMapLength; j++) {
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue