From 3224e193b2464f7660e0029258d94a28078c51f1 Mon Sep 17 00:00:00 2001 From: Brett Saviano Date: Wed, 13 Nov 2024 07:51:59 -0500 Subject: [PATCH] Update extension.ts --- client/src/extension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/extension.ts b/client/src/extension.ts index 632b58a..a768ddc 100644 --- a/client/src/extension.ts +++ b/client/src/extension.ts @@ -162,7 +162,7 @@ export async function activate(context: ExtensionContext) { // get it from the server manager's authentication provider. const scopes = [serverSpec.serverName, serverSpec.username]; try { - const account = serverManagerApi.getAccount ? serverManagerApi.getAccount(serverSpec) : undefined; + const account = serverManagerApi?.getAccount ? serverManagerApi.getAccount(serverSpec) : undefined; let session = await authentication.getSession(serverManager.AUTHENTICATION_PROVIDER, scopes, { silent: true, account }); if (!session) { session = await authentication.getSession(serverManager.AUTHENTICATION_PROVIDER, scopes, { createIfNone: true, account });