Skip to content

Commit 4d7f01f

Browse files
committed
Merge pull request #744 from laurelnaiad/iss742
don't try to read missing .babelrc file
2 parents 1e8f9b9 + 317a09f commit 4d7f01f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/main/lang/modules/building.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function getBabelInstance(projectDirectory) {
106106
return new Promise(function (resolve) {
107107
findup(projectDirectory, '.babelrc', function (err, dir) {
108108
if (err)
109-
resolve(babel);
109+
return resolve(babel);
110110
fs.readFile(path.join(dir, '.babelrc'), function (err, data) {
111111
try {
112112
babelConfigs[projectDirectory] = JSON.parse(data.toString());

lib/main/lang/modules/building.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function getBabelInstance(projectDirectory: string) {
131131
}).then(babel => {
132132
return new Promise<any>(resolve => {
133133
findup(projectDirectory, '.babelrc', function(err: any, dir) {
134-
if (err) resolve(babel);
134+
if (err) return resolve(babel);
135135

136136
fs.readFile(path.join(dir, '.babelrc'), function(err, data) {
137137
try {

0 commit comments

Comments
 (0)