From 746a54c631d6bbd88bfbaa108fcaeeaa700e6ba7 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Mon, 9 Aug 2021 16:48:26 +0100 Subject: [PATCH] fix: fix up examples (#3799) Not sure how the build for #3785 passed without this, but it did? --- examples/browser-exchange-files/public/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/browser-exchange-files/public/app.js b/examples/browser-exchange-files/public/app.js index 5b20d82f84..3a19e3a4f6 100644 --- a/examples/browser-exchange-files/public/app.js +++ b/examples/browser-exchange-files/public/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.`)