Skip to content

Commit

Permalink
Update lib/compile.js
Browse files Browse the repository at this point in the history
Co-authored-by: Jérémy Benoist <j0k3r@users.noreply.github.com>
  • Loading branch information
medikoo and j0k3r committed Nov 22, 2021
1 parent 2911e82 commit 337a90d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ function webpackConcurrentCompile(configs, logStats, concurrency, ServerlessErro
{ concurrency }
).then(stats => {
if (errors.length) {
if (errors.length === 1) throw errors[0];
if (errors.length === 1) {
throw errors[0];
}
throw new ServerlessError('Webpack compilation errors, see stats above');
}
return _.flatten(stats);
Expand Down

0 comments on commit 337a90d

Please sign in to comment.