Skip to content

Commit

Permalink
Update extension.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-bsaviano committed Nov 13, 2024
1 parent 0279df0 commit 3224e19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit 3224e19

Please sign in to comment.