diff --git a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts index bcfa887b1a462..8bd6d25f2ca96 100644 --- a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts +++ b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts @@ -443,7 +443,7 @@ export abstract class AbstractExtensionService extends Disposable implements IEx class ProposedApiController { - private readonly enableProposedApiFor: string | string[]; + private readonly enableProposedApiFor: string[]; private readonly enableProposedApiForAll: boolean; private readonly productAllowProposedApi: Set; @@ -451,15 +451,8 @@ class ProposedApiController { @IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService, @IProductService productService: IProductService ) { - this.enableProposedApiFor = environmentService.args['enable-proposed-api'] || []; - if (this.enableProposedApiFor.length) { - // Make enabled proposed API be lowercase for case insensitive comparison - if (Array.isArray(this.enableProposedApiFor)) { - this.enableProposedApiFor = this.enableProposedApiFor.map(id => id.toLowerCase()); - } else { - this.enableProposedApiFor = this.enableProposedApiFor.toLowerCase(); - } - } + // Make enabled proposed API be lowercase for case insensitive comparison + this.enableProposedApiFor = (environmentService.args['enable-proposed-api'] || []).map(id => id.toLowerCase()); this.enableProposedApiForAll = !environmentService.isBuilt || (!!environmentService.extensionDevelopmentLocationURI && productService.nameLong !== 'Visual Studio Code') ||