From 150720f4317e6a50795de392ffd54b9a8718724e Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Wed, 9 Sep 2015 23:57:10 -0700 Subject: [PATCH] Fix template loading when hidden files exist This made debugging https://github.com/babel/babel/pull/2352 confusing because I had some vim swap files so it didn't load any of the templates. (I assume this was the original intention.) --- packages/babel-core/src/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-core/src/util.js b/packages/babel-core/src/util.js index b2e3adb0be..878af6f20c 100644 --- a/packages/babel-core/src/util.js +++ b/packages/babel-core/src/util.js @@ -222,7 +222,7 @@ function loadTemplates(): Object { } for (var name of (fs.readdirSync(templatesLoc): Array)) { - if (name[0] === ".") return; + if (name[0] === ".") continue; var key = path.basename(name, path.extname(name)); var loc = path.join(templatesLoc, name);