Fix syntax error (return outside function).

Need to fix this for code to be parsable by prettier.
This commit is contained in:
Tobias Lidskog 2017-04-29 09:27:42 +02:00
parent 14cbe4514c
commit ea7b0d2cf7
1 changed files with 7 additions and 3 deletions

View File

@ -26,12 +26,16 @@ parsed.options.explicitOptions = parsed.explicitOptions;
parsed.options.urls = parsed.urls;
parsed.options.urlsMetaData = parsed.urlsMetaData;
return sitespeed.run(parsed.options)
.then((result) => {
sitespeed
.run(parsed.options)
.then(result => {
if (result.errors.length > 0) {
throw new Error('Errors while running:\n' + result.errors.join('\n'));
}
if (parsed.options.budget && Object.keys(result.budgetResult.failing).length > 0) {
if (
parsed.options.budget &&
Object.keys(result.budgetResult.failing).length > 0
) {
process.exitCode = 1;
budgetFailing = true;
}