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

Commit 3f07067

Browse files
committed
Rename "base" to "path" in traverse.
1 parent f65abd6 commit 3f07067

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/importer.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,13 @@ function Importer (dagService, options) {
240240

241241
let pendingWrites = 0
242242

243-
function traverse (tree, base, done) {
243+
function traverse (tree, path, done) {
244244
const keys = Object.keys(tree)
245245
let tmpTree = tree
246246
keys.map((key) => {
247247
if (typeof tmpTree[key] === 'object' &&
248248
!Buffer.isBuffer(tmpTree[key])) {
249-
tmpTree[key] = traverse.call(this, tmpTree[key], base ? base + '/' + key : key, done)
249+
tmpTree[key] = traverse.call(this, tmpTree[key], path ? path + '/' + key : key, done)
250250
}
251251
})
252252

@@ -272,9 +272,9 @@ function Importer (dagService, options) {
272272
pendingWrites--
273273
if (err) {
274274
this.push({error: 'failed to store dirNode'})
275-
} else if (base) {
275+
} else if (path) {
276276
const el = {
277-
path: base,
277+
path: path,
278278
multihash: n.multihash(),
279279
yes: 'no',
280280
size: n.size()
@@ -287,7 +287,7 @@ function Importer (dagService, options) {
287287
}
288288
})
289289

290-
if (!base) {
290+
if (!path) {
291291
return
292292
}
293293

0 commit comments

Comments
 (0)