Fix: config lookup logic in babel-core (#5550)

This fixes a bug that was causing the config lookup to stop
when a package.json file was found even if it did not contain a
"babel" key.
This commit is contained in:
Kai Cataldo
2017-03-27 14:54:57 -04:00
committed by Logan Smyth
parent 7a1ccf076c
commit 1f2f63ccdf
4 changed files with 60 additions and 1 deletions

View File

@@ -163,7 +163,7 @@ class ConfigChainBuilder {
this.errorMultipleConfigs(arr.pop(), config);
}
arr.push(config);
if (configAdded) arr.push(config);
}
return arr;