From dbec80debaa9a7b9369b5febc4697e61c2d4f5f1 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Fri, 21 Apr 2017 12:07:41 -0700 Subject: [PATCH] Make sure .babelrc is a file, not a directory (#427) --- src/utils/exists.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/exists.js b/src/utils/exists.js index 96cb0ce8..b9675f29 100644 --- a/src/utils/exists.js +++ b/src/utils/exists.js @@ -14,7 +14,7 @@ module.exports = function(cache) { if (!filename) { return false; } - cache[filename] = cache[filename] || fs.existsSync(filename); + cache[filename] = cache[filename] || (fs.existsSync(filename) && fs.statSync(filename).isFile()); return cache[filename]; };