Skip to content

Commit a5afd7b

Browse files
hanslvikerman
authored andcommitted
fix(@angular-devkit/build-angular): force event category to be something
If it is empty (or undefined), the Universal Analytics package will not send events.
1 parent dc9dc0f commit a5afd7b

File tree

1 file changed

+3
-1
lines changed
  • packages/angular_devkit/build_angular/src/browser

1 file changed

+3
-1
lines changed

packages/angular_devkit/build_angular/src/browser/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ function getAnalyticsConfig(
118118
let category = 'build';
119119
if (context.builder) {
120120
// We already vetted that this is a "safe" package, otherwise the analytics would be noop.
121-
category = context.builder.builderName.split(':')[1];
121+
category = context.builder.builderName.split(':')[1]
122+
|| context.builder.builderName
123+
|| 'build';
122124
}
123125

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

0 commit comments

Comments
 (0)