Skip to content

Commit a85eb3b

Browse files
author
Kartik Raj
authored
Fix startup telemetry issue (#21203)
Could fix #20874 based on error trace.
1 parent 17daae4 commit a85eb3b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/client/startupTelemetry.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ async function getActivationTelemetryProps(serviceContainer: IServiceContainer):
8989
return { workspaceFolderCount, terminal: terminalShellType };
9090
}
9191
const interpreterService = serviceContainer.get<IInterpreterService>(IInterpreterService);
92-
const mainWorkspaceUri = workspaceService.workspaceFolders ? workspaceService.workspaceFolders[0].uri : undefined;
92+
const mainWorkspaceUri = workspaceService.workspaceFolders?.length
93+
? workspaceService.workspaceFolders[0].uri
94+
: undefined;
9395
const hasPythonThree = await interpreterService.hasInterpreters(async (item) => item.version?.major === 3);
9496
// If an unknown type environment can be found from windows registry or path env var,
9597
// consider them as global type instead of unknown. Such types can only be known after

0 commit comments

Comments
 (0)