We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
mv
1 parent 568f211 commit df3df26Copy full SHA for df3df26
lib/index.js
@@ -49,8 +49,6 @@ module.exports = function(options) {
49
safeFileNameRegex = options.safeFileNames;
50
51
filename = filename.replace(safeFileNameRegex, '');
52
-
53
- console.log('filename yo', filename);
54
}
55
56
var newFile = {
@@ -63,10 +61,12 @@ module.exports = function(options) {
63
61
fstream = fs.createWriteStream(path);
64
62
streamifier.createReadStream(buf).pipe(fstream);
65
fstream.on('error', function(error) {
66
- callback(error);
+ if (callback)
+ callback(error);
67
});
68
fstream.on('close', function() {
69
- callback(null);
+ callback(null);
70
71
72
};
0 commit comments