spread originalConfig rather than reconstructing it

This commit is contained in:
Jeremie Laval 2023-08-15 12:26:13 -04:00 committed by Huiwen
parent a329907d0e
commit 465b92f3ac

View File

@ -574,12 +574,8 @@ function readCookie(name: string): string | undefined {
const secretStorageCrypto = secretStorageKeyPath && ServerKeyedAESCrypto.supported()
? new ServerKeyedAESCrypto(secretStorageKeyPath) : new TransparentCrypto();
const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents; workspaceUri?: UriComponents; callbackRoute: string } = {
...originalConfig,
remoteAuthority: window.location.host,
developmentOptions: originalConfig.developmentOptions,
settingsSyncOptions: originalConfig.settingsSyncOptions,
folderUri: originalConfig.folderUri,
workspaceUri: originalConfig.workspaceUri,
callbackRoute: originalConfig.callbackRoute
};
// Create workbench
@ -587,7 +583,6 @@ function readCookie(name: string): string | undefined {
...config,
windowIndicator: config.windowIndicator ?? { label: '$(remote)', tooltip: `${product.nameShort} Web` },
settingsSyncOptions: config.settingsSyncOptions ? { enabled: config.settingsSyncOptions.enabled, } : undefined,
developmentOptions: { ...config.developmentOptions },
workspaceProvider: WorkspaceProvider.create(config),
urlCallbackProvider: new LocalStorageURLCallbackProvider(config.callbackRoute),
secretStorageProvider: config.remoteAuthority && !secretStorageKeyPath