diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 89663f4f22a1d537ad748793e95108c033883ca5..8bd7e3aef850671681c7ef74ec27ed12898ad1c2 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -540,7 +540,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I return extHostProgress.withProgress(extension, { location: extHostTypes.ProgressLocation.SourceControl }, (progress, token) => task({ report(n: number) { /*noop*/ } })); }, withProgress(options: vscode.ProgressOptions, task: (progress: vscode.Progress<{ message?: string; worked?: number }>, token: vscode.CancellationToken) => Thenable) { - if (typeof options.location !== 'number') { + if (typeof options.location === 'object') { checkProposedApiEnabled(extension); } return extHostProgress.withProgress(extension, options, task); diff --git a/src/vs/workbench/api/common/extHostTypeConverters.ts b/src/vs/workbench/api/common/extHostTypeConverters.ts index 0a0034e0b441af8af001c63640c700482130d0f7..68869ca7237c77bb0781f54f4430e35c4ccaf059 100644 --- a/src/vs/workbench/api/common/extHostTypeConverters.ts +++ b/src/vs/workbench/api/common/extHostTypeConverters.ts @@ -1094,8 +1094,8 @@ export namespace EndOfLine { export namespace ProgressLocation { export function from(loc: vscode.ProgressLocation | { viewId: string }): MainProgressLocation | string { - if (typeof loc === 'string') { - return loc; + if (typeof loc === 'object') { + return loc.viewId; } switch (loc) {