Skip to content

Commit

Permalink
Fix: Session credentials can be undefined (#220034)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmarti committed Jul 19, 2024
1 parent 25f1b45 commit 7d6936c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vs/platform/native/electron-main/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,11 @@ export class ProxyAuthService extends Disposable implements IProxyAuthService {
// Reply with session credentials unless we used them already.
// In that case we need to show a login dialog again because
// they seem invalid.
if (authInfo.attempt === 1 && this.sessionCredentials.has(authInfoHash)) {
const sessionCredentials = authInfo.attempt === 1 && this.sessionCredentials.get(authInfoHash);
if (sessionCredentials) {
this.logService.trace('auth#doResolveProxyCredentials (proxy) - exit - found session credentials to use');

const { username, password } = this.sessionCredentials.get(authInfoHash)!;
const { username, password } = sessionCredentials;
return { username, password };
}

Expand Down

0 comments on commit 7d6936c

Please sign in to comment.