From f6c14608cc1562128de585febf4ece78f2a7638d Mon Sep 17 00:00:00 2001 From: Kenneth Skovhus Date: Sat, 8 Dec 2018 23:50:36 +0100 Subject: [PATCH] Fix TypeError in case no files were found Fixes "UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined" --- src/Runner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Runner.js b/src/Runner.js index d172fd37..311caec0 100644 --- a/src/Runner.js +++ b/src/Runner.js @@ -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);