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

Commit a5b9816

Browse files
committed
revisions
1 parent 461c500 commit a5b9816

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/exporter.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,14 @@ function Exporter (hash, dagService, options) {
3636
this._read = (n) => {}
3737

3838
let fileExporter = (node, name, done) => {
39-
let init
39+
let init = false
4040

4141
if (!done) throw new Error('done must be set')
4242

4343
// Logic to export a single (possibly chunked) unixfs file.
4444
var rs = new Readable()
4545
if (node.links.length === 0) {
4646
const unmarshaledData = UnixFS.unmarshal(node.data)
47-
init = false
4847
rs._read = () => {
4948
if (init) {
5049
return
@@ -56,7 +55,6 @@ function Exporter (hash, dagService, options) {
5655
this.push({ content: rs, path: name })
5756
done()
5857
} else {
59-
init = false
6058
rs._read = () => {
6159
if (init) {
6260
return

0 commit comments

Comments
 (0)