Skip to content

Commit

Permalink
refactor(@angular-devkit/build-angular): exit early when there are no…
Browse files Browse the repository at this point in the history
… component style budgets

With this change we exit the function early, when there are no budgets defined.

(cherry picked from commit a35262e)
  • Loading branch information
alan-agius4 authored and filipesilva committed Jan 16, 2022
1 parent 0a54877 commit 47c03b0
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export class AnyComponentStyleBudgetChecker {
stage: Compilation.PROCESS_ASSETS_STAGE_ANALYSE,
},
() => {
// No budgets.
if (this.budgets.length === 0) {
return;
}

// In AOT compilations component styles get processed in child compilations.
if (!compilation.compiler.parentCompilation) {
return;
Expand Down

0 comments on commit 47c03b0

Please sign in to comment.