diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 89663f4f22a..8bd7e3aef85 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 0a0034e0b44..68869ca7237 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) {