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

Commit

Permalink
fix(dag): print data in a readable way if it is JSON
Browse files Browse the repository at this point in the history
If a dag node is JSON, print the stringified version of it, so that
it shows the actual JSON and not just `[object Object]`.
  • Loading branch information
vmx authored and daviddias committed Feb 12, 2018
1 parent aea9344 commit 42545dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/commands/dag/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = {
if (node._json) {
delete node._json.multihash
node._json.data = '0x' + node._json.data.toString('hex')
print(node._json)
print(JSON.stringify(node._json))
return
}

Expand Down

0 comments on commit 42545dc

Please sign in to comment.