Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): force event category to be something
Browse files Browse the repository at this point in the history
If it is empty (or undefined), the Universal Analytics package will not send events.
  • Loading branch information
hansl authored and vikerman committed Jun 25, 2019
1 parent 1ba2a03 commit 65424f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/angular_devkit/build_angular/src/browser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ function getAnalyticsConfig(
let category = 'build';
if (context.builder) {
// We already vetted that this is a "safe" package, otherwise the analytics would be noop.
category = context.builder.builderName.split(':')[1];
category = context.builder.builderName.split(':')[1]
|| context.builder.builderName
|| 'build';
}

// The category is the builder name if it's an angular builder.
Expand Down

0 comments on commit 65424f7

Please sign in to comment.