From d0a1bfc6adf584b5e7f0396bd85b0a4afc97c18d Mon Sep 17 00:00:00 2001 From: tcme Date: Mon, 23 Oct 2017 09:13:38 +0200 Subject: [PATCH 1/2] fixes example should get the whole tree --- SPEC/DAG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPEC/DAG.md b/SPEC/DAG.md index 800edbaf0..e0121bc03 100644 --- a/SPEC/DAG.md +++ b/SPEC/DAG.md @@ -152,7 +152,7 @@ function errOrLog(err, result) { } } -ipfs.dag.tree('zdpuAmtur968yprkhG9N5Zxn6MFVoqAWBbhUAkNLJs2UtkTq5/a', errOrLog) +ipfs.dag.tree('zdpuAmtur968yprkhG9N5Zxn6MFVoqAWBbhUAkNLJs2UtkTq5', errOrLog) // Logs: // a // b From 469f8361a3370f898fc4a7c66246beabcec6ab31 Mon Sep 17 00:00:00 2001 From: tcme Date: Mon, 23 Oct 2017 09:29:20 +0200 Subject: [PATCH 2/2] dag.tree returns the value (not result.value) --- SPEC/DAG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPEC/DAG.md b/SPEC/DAG.md index e0121bc03..3933d2ad2 100644 --- a/SPEC/DAG.md +++ b/SPEC/DAG.md @@ -148,7 +148,7 @@ function errOrLog(err, result) { if (err) { console.error('error: ' + err) } else { - console.log(result.value) + console.log(result) } }