Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Commit 78ed206

Browse files
fix: fix up examples (#19)
1 parent aa219d1 commit 78ed206

File tree

1 file changed

+3
-3
lines changed
  • examples/browser-exchange-files/src

1 file changed

+3
-3
lines changed

examples/browser-exchange-files/src/app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ async function getFile () {
239239

240240
FILES.push(hash)
241241

242-
for await (const file of node.get(hash)) {
243-
if (file.content) {
244-
const content = uint8ArrayConcat(await all(file.content))
242+
for await (const file of node.ls(hash)) {
243+
if (file.type === 'file') {
244+
const content = uint8ArrayConcat(await all(node.cat(file.cid)))
245245

246246
await appendFile(file.name, hash, file.size, content)
247247
onSuccess(`The ${file.name} file was added.`)

0 commit comments

Comments
 (0)