Skip to content

Commit

Permalink
Fix TypeError in case no files were found (#295)
Browse files Browse the repository at this point in the history
Fixes "UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined"
  • Loading branch information
skovhus authored and fkling committed Jan 16, 2019
1 parent 891dea3 commit 16fcf0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ function run(transformFile, paths, options) {

if (numFiles === 0) {
process.stdout.write('No files selected, nothing to do. \n');
return;
return [];
}

const processes = options.runInBand ? 1 : Math.min(numFiles, cpus);
Expand Down

0 comments on commit 16fcf0a

Please sign in to comment.