Skip to content

Commit 65424f7

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 1ba2a03 commit 65424f7

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
@@ -110,7 +110,9 @@ function getAnalyticsConfig(
110110
let category = 'build';
111111
if (context.builder) {
112112
// We already vetted that this is a "safe" package, otherwise the analytics would be noop.
113-
category = context.builder.builderName.split(':')[1];
113+
category = context.builder.builderName.split(':')[1]
114+
|| context.builder.builderName
115+
|| 'build';
114116
}
115117

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

0 commit comments

Comments
 (0)