Skip to content

Commit 5272e12

Browse files
authored
fix: avoid throw error when use readme code
ipfs#2933
1 parent 82b9e08 commit 5272e12

File tree

1 file changed

+2
-0
lines changed
  • packages/interface-ipfs-core/SPEC

1 file changed

+2
-0
lines changed

packages/interface-ipfs-core/SPEC/FILES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ const cid = 'QmQ2r6iMNpky5f1m4cnm3Yqw8VSvjuKpTcK1X7dBR1LkJF'
293293

294294
for await (const file of ipfs.get(cid)) {
295295
console.log(file.path)
296+
297+
if (!file.content) continue;
296298

297299
const content = new BufferList()
298300
for await (const chunk of file.content) {

0 commit comments

Comments
 (0)