-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
} | ||
if (inPath === '.' && recursive === true) { | ||
inPath = process.cwd() | ||
return inPath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a need for this return?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inPath is not declared in this scope and needs to be returned on line 58, unless I'm missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, since there is the return of inPath in the end of the func and this assignment of inPath is within a if/else clause, you just need the return once
filePair = {path: addPath, stream: rs} | ||
i.write(filePair) | ||
callback() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be simplified:
if (!fs.statSync(element).isDirectory()) {
i.write({path: addPath, stream: fs.createReadStrem(element})
}
callback()
@nginnever CR'ed :) |
Merged in #204 |
No description provided.