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

Fix: traverse-ipld-graphs (tree) example #2088

Merged
merged 1 commit into from
May 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/traverse-ipld-graphs/put.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ createNode((err, ipfs) => {
}
console.log(cid.toBaseEncodedString())
// should print:
// zdpuAzZSktMhXjJu5zneSFrg9ue5rLXKAMC9KLigqhQ7Q7vRm
// bafyreigsccjrxlioppkkzv27se4gxh2aygbxfnsobkaxxqiuni544uk66a
})
})
8 changes: 5 additions & 3 deletions examples/traverse-ipld-graphs/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ createNode((err, ipfs) => {
let node

try {
dagPB.DAGNode.create(someData)
node = dagPB.DAGNode.create(someData)
} catch (err) {
return cb(err)
}

ipfs.dag.put(node, { format: 'dag-pb', hashAlg: 'sha2-256' }, (err, cid) => {
if (err) {
cb(err)
return cb(err)
}
cidPBNode = cid
cb()
Expand Down Expand Up @@ -58,5 +58,7 @@ createNode((err, ipfs) => {
console.log(paths)
})
}
])
], (err) => {
console.error('Error:', err)
})
})