From 0a6df24b265fa09012ea45678619d1b2e406e552 Mon Sep 17 00:00:00 2001 From: Oliverio Sousa <47525443+oliveriosousa@users.noreply.github.com> Date: Tue, 10 Aug 2021 12:48:17 +0100 Subject: [PATCH] fix: fix up examples --- examples/browser-exchange-files/src/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/browser-exchange-files/src/app.js b/examples/browser-exchange-files/src/app.js index 5b20d82f..3a19e3a4 100644 --- a/examples/browser-exchange-files/src/app.js +++ b/examples/browser-exchange-files/src/app.js @@ -239,9 +239,9 @@ async function getFile () { FILES.push(hash) - for await (const file of node.get(hash)) { - if (file.content) { - const content = uint8ArrayConcat(await all(file.content)) + for await (const file of node.ls(hash)) { + if (file.type === 'file') { + const content = uint8ArrayConcat(await all(node.cat(file.cid))) await appendFile(file.name, hash, file.size, content) onSuccess(`The ${file.name} file was added.`)