From 408847b86d71fd7e9f95c102571322a90aacfcc9 Mon Sep 17 00:00:00 2001 From: bobymxiang Date: Wed, 9 Aug 2017 15:41:52 +0800 Subject: [PATCH] fixed strange problem with webpack. https://github.com/fshost/node-dir/issues/46 --- lib/readfiles.js | 2 +- lib/readfilesstream.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/readfiles.js b/lib/readfiles.js index ea3df03..20db44c 100644 --- a/lib/readfiles.js +++ b/lib/readfiles.js @@ -62,7 +62,7 @@ function readFiles(dir, options, callback, complete) { }; fs.readdir(dir, function(err, list) { - if (err)  { + if (err) { if (options.doneOnErr === true) { if (err.code === 'EACCES') return done(); return done(err); diff --git a/lib/readfilesstream.js b/lib/readfilesstream.js index b318ccf..eddd202 100644 --- a/lib/readfilesstream.js +++ b/lib/readfilesstream.js @@ -71,7 +71,7 @@ function readFilesStream(dir, options, callback, complete) { }; fs.readdir(dir, function(err, list) { - if (err)  { + if (err) { if (options.doneOnErr === true) { if (err.code === 'EACCES') return done(); return done(err);