mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-25 15:06:55 +00:00
Fix Telemetry for String Case (#163)
This commit is contained in:
parent
47a5c315b5
commit
e837f574a8
@ -114,13 +114,17 @@ export default class TelemetryProcessor {
|
||||
return validTimestamp;
|
||||
}
|
||||
|
||||
private static getData(data?: any): any {
|
||||
private static getData(data: any = {}): any {
|
||||
if (typeof data === "string") {
|
||||
data = { message: data };
|
||||
}
|
||||
return {
|
||||
// TODO: Need to `any` here since the window imports Explorer which can't be in strict mode yet
|
||||
authType: (window as any).authType,
|
||||
subscriptionId: userContext.subscriptionId,
|
||||
platform: configContext.platform,
|
||||
...(data ? data : [])
|
||||
env: process.env.NODE_ENV,
|
||||
...data
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user