Skip to content

Commit

Permalink
fix(@angular/cli): only set DebugView when NG_DEBUG is passed
Browse files Browse the repository at this point in the history
`querystring.stringify` will not remove undefined values.
  • Loading branch information
alan-agius4 authored and angular-robot[bot] committed Feb 2, 2023
1 parent 61eeb5d commit 7bcb19c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/angular/cli/src/analytics/analytics-collector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ export class AnalyticsCollector {
[RequestParameter.UserAgentArchitecture]: os.arch(),
[RequestParameter.UserAgentPlatform]: os.platform(),
[RequestParameter.UserAgentPlatformVersion]: os.version(),

// Set undefined to disable debug view.
[RequestParameter.DebugView]: ngDebug ? 1 : undefined,
};

if (ngDebug) {
requestParameters[RequestParameter.DebugView] = 1;
}

this.requestParameterStringified = querystring.stringify(requestParameters);

const parsedVersion = semver.parse(process.version);
Expand Down

0 comments on commit 7bcb19c

Please sign in to comment.