Skip to content

Commit

Permalink
fix: errors brake batch run (#69)
Browse files Browse the repository at this point in the history
Co-authored-by: Onur Ozguzel <[email protected]>
  • Loading branch information
Onur and Onur Ozguzel authored Aug 24, 2021
1 parent 3ce331a commit 42c8372
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ function checkBudgets(summary, options) {
}
}

if (options.accessibility > 0) {
if (options.accessibility > 0 && summary.detail) {
const score = toScore(summary.detail.accessibility);
if (score < options.accessibility) {
errors.push(
Expand All @@ -259,7 +259,7 @@ function checkBudgets(summary, options) {
}
}

if (options.performance > 0) {
if (options.performance > 0 && summary.detail) {
const score = toScore(summary.detail.performance);
if (score < options.performance) {
errors.push(
Expand All @@ -268,7 +268,7 @@ function checkBudgets(summary, options) {
}
}

if (options.bestPractices > 0) {
if (options.bestPractices > 0 && summary.detail) {
const score = toScore(summary.detail["best-practices"]);
if (score < options.bestPractices) {
errors.push(
Expand All @@ -277,7 +277,7 @@ function checkBudgets(summary, options) {
}
}

if (options.seo > 0) {
if (options.seo > 0 && summary.detail) {
const score = toScore(summary.detail.seo);
if (score < options.seo) {
errors.push(
Expand All @@ -286,7 +286,7 @@ function checkBudgets(summary, options) {
}
}

if (options.pwa > 0) {
if (options.pwa > 0 && summary.detail) {
const score = toScore(summary.detail.pwa);
if (score < options.pwa) {
errors.push(
Expand Down

0 comments on commit 42c8372

Please sign in to comment.