be defensive when checking remote authority

This commit is contained in:
kieferrm
2020-05-01 04:38:52 +00:00
parent cab916c570
commit 829230a5a8

View File

@@ -324,7 +324,7 @@ export class MainThreadAuthentication extends Disposable implements MainThreadAu
}
const remoteConnection = this.remoteAgentService.getConnection();
if (remoteConnection && remoteConnection.remoteAuthority.startsWith('vsonline') && VSO_ALLOWED_EXTENSIONS.includes(extensionId)) {
if (remoteConnection && remoteConnection.remoteAuthority && remoteConnection.remoteAuthority.startsWith('vsonline') && VSO_ALLOWED_EXTENSIONS.includes(extensionId)) {
return true;
}