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

Commit 42545dc

Browse files
vmxdaviddias
authored andcommitted
fix(dag): print data in a readable way if it is JSON
If a dag node is JSON, print the stringified version of it, so that it shows the actual JSON and not just `[object Object]`.
1 parent aea9344 commit 42545dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cli/commands/dag/get.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = {
4242
if (node._json) {
4343
delete node._json.multihash
4444
node._json.data = '0x' + node._json.data.toString('hex')
45-
print(node._json)
45+
print(JSON.stringify(node._json))
4646
return
4747
}
4848

0 commit comments

Comments
 (0)