Skip to content

Commit

Permalink
safely calculate it
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj committed Feb 21, 2024
1 parent 026554a commit 86e1de0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ export async function activate(context: IExtensionContext): Promise<PythonExtens
let api: PythonExtension;
let ready: Promise<void>;
let serviceContainer: IServiceContainer;
const isFirstSession = context.globalState.get(GLOBAL_PERSISTENT_KEYS, []).length === 0;
let isFirstSession: boolean | undefined;
try {
isFirstSession = context.globalState.get(GLOBAL_PERSISTENT_KEYS, []).length === 0;
const workspaceService = new WorkspaceService();
context.subscriptions.push(
workspaceService.onDidGrantWorkspaceTrust(async () => {
Expand Down

0 comments on commit 86e1de0

Please sign in to comment.