Skip to content

Commit e7cf691

Browse files
committed
Nit
1 parent 9598245 commit e7cf691

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/cid_dag_metadata.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export async function buildUnixFSDagPB(chunks, mhCode = 0x12) {
1414
throw new Error('❌ buildUnixFSDag: chunks[] is empty')
1515
}
1616

17-
// UnixFS blockSizes = sizes of child blocks
18-
const blockSizes = chunks.map(c => c.len)
17+
// UnixFS blockSizes = sizes of child blocks (must be regular numbers, not BigInt)
18+
const blockSizes = chunks.map(c => Number(c.len))
1919

2020
console.log(`🧩 Building UnixFS DAG from chunks:
2121
• totalChunks: ${chunks.length}

0 commit comments

Comments
 (0)