Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit d2b203b

Browse files
vmxdaviddias
authored andcommitted
fix(dag): path logic for DAG get was wrong
1 parent ad9eab8 commit d2b203b

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/dag/get.js

+1-12
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,12 @@ module.exports = (send) => {
2020
}
2121

2222
options = options || {}
23+
path = path || ''
2324

2425
if (CID.isCID(cid)) {
2526
cid = cid.toBaseEncodedString()
2627
}
2728

28-
if (typeof cid === 'string') {
29-
const split = cid.split('/')
30-
cid = split[0]
31-
split.shift()
32-
33-
if (split.length > 0) {
34-
path = split.join('/')
35-
} else {
36-
path = '/'
37-
}
38-
}
39-
4029
waterfall([
4130
cb => {
4231
send({

0 commit comments

Comments
 (0)