Skip to content

Commit 47e759e

Browse files
Merge master into feature/amazonq
2 parents 36b170b + 3b4e7ed commit 47e759e

File tree

1 file changed

+5
-2
lines changed
  • packages/core/src/codecatalyst

1 file changed

+5
-2
lines changed

packages/core/src/codecatalyst/auth.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,12 @@ export class CodeCatalystAuthenticationProvider {
375375
return this.memento.get(this.mementoKey, {} as Record<string, ConnectionState>)
376376
}
377377

378+
public tryGetConnectionState(conn: SsoConnection): ConnectionState | undefined {
379+
return this.getStates()[conn.id]
380+
}
378381
public getConnectionState(conn: SsoConnection): ConnectionState {
379382
return (
380-
this.getStates()[conn.id] ?? {
383+
this.tryGetConnectionState(conn) ?? {
381384
onboarded: false,
382385
scopeExpired: false,
383386
}
@@ -397,7 +400,7 @@ export class CodeCatalystAuthenticationProvider {
397400
}
398401

399402
public async isConnectionOnboarded(conn: SsoConnection, recheck = false) {
400-
const state = this.getConnectionState(conn)
403+
const state = this.tryGetConnectionState(conn)
401404
if (state !== undefined && !recheck) {
402405
return state.onboarded
403406
}

0 commit comments

Comments
 (0)