We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9a607fb + 90945ca commit 2ead3aaCopy full SHA for 2ead3aa
src/browser/telemetryReporter.ts
@@ -14,7 +14,9 @@ function getBrowserRelease(navigator: Navigator): string {
14
const browser = navigator.userAgentData.brands[navigator.userAgentData.brands.length - 1];
15
return `${navigator.userAgentData.platform} - ${browser?.brand} v${browser?.version}}`;
16
} else {
17
- return navigator.appVersion;
+ // clean the user agent using the logic from here:
18
+ // https://github.com/microsoft/vscode/blob/main/src/vs/workbench/services/telemetry/browser/workbenchCommonProperties.ts#L14C1-L21C2
19
+ return navigator.userAgent.replace(/(\d+\.\d+)(\.\d+)+/g, "$1");
20
}
21
22
0 commit comments