From f682e3bc5357ae56e94ea83180a7268415f8e460 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 28 Aug 2019 14:01:25 +0200 Subject: [PATCH] web - align API with what we expect --- .../services/remote/browser/remoteAgentServiceImpl.ts | 5 ++++- src/vs/workbench/workbench.web.api.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/remote/browser/remoteAgentServiceImpl.ts b/src/vs/workbench/services/remote/browser/remoteAgentServiceImpl.ts index ea4a572bf93..22a57d34634 100644 --- a/src/vs/workbench/services/remote/browser/remoteAgentServiceImpl.ts +++ b/src/vs/workbench/services/remote/browser/remoteAgentServiceImpl.ts @@ -30,7 +30,10 @@ export class RemoteAgentService extends AbstractRemoteAgentService implements IR super(environmentService); this.socketFactory = new BrowserSocketFactory(webSocketFactory); - this._connection = this._register(new RemoteAgentConnection(environmentService.configuration.remoteAuthority!, productService.commit, this.socketFactory, remoteAuthorityResolverService, signService, logService)); + const remoteAuthority = environmentService.configuration.remoteAuthority; + if (remoteAuthority) { + this._connection = this._register(new RemoteAgentConnection(remoteAuthority, productService.commit, this.socketFactory, remoteAuthorityResolverService, signService, logService)); + } } getConnection(): IRemoteAgentConnection | null { diff --git a/src/vs/workbench/workbench.web.api.ts b/src/vs/workbench/workbench.web.api.ts index 4bdfb542d9f..a2192828661 100644 --- a/src/vs/workbench/workbench.web.api.ts +++ b/src/vs/workbench/workbench.web.api.ts @@ -19,7 +19,7 @@ export interface IWorkbenchConstructionOptions { * Experimental: the remote authority is the IP:PORT from where the workbench is served * from. It is for example being used for the websocket connections as address. */ - remoteAuthority: string; + remoteAuthority?: string; /** * The connection token to send to the server. -- GitLab