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

Commit

Permalink
fix(dag): path logic for DAG get was wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
vmx authored and daviddias committed Apr 5, 2018
1 parent ad9eab8 commit d2b203b
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/dag/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,12 @@ module.exports = (send) => {
}

options = options || {}
path = path || ''

if (CID.isCID(cid)) {
cid = cid.toBaseEncodedString()
}

if (typeof cid === 'string') {
const split = cid.split('/')
cid = split[0]
split.shift()

if (split.length > 0) {
path = split.join('/')
} else {
path = '/'
}
}

waterfall([
cb => {
send({
Expand Down

0 comments on commit d2b203b

Please sign in to comment.