diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 3c22ef62f9a..fb2762dcc0b 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -466,7 +466,8 @@ export function createApiFactory( onDidChangeConfiguration: (listener: (_: any) => any, thisArgs?: any, disposables?: extHostTypes.Disposable[]) => { return extHostConfiguration.onDidChangeConfiguration(listener, thisArgs, disposables); }, - getConfiguration: (section?: string, resource?: vscode.Uri): vscode.WorkspaceConfiguration => { + getConfiguration(section?: string, resource?: vscode.Uri): vscode.WorkspaceConfiguration { + resource = arguments.length === 1 ? void 0 : resource; return extHostConfiguration.getConfiguration(section, resource, extension.id); }, registerTextDocumentContentProvider(scheme: string, provider: vscode.TextDocumentContentProvider) { diff --git a/src/vs/workbench/api/node/extHostConfiguration.ts b/src/vs/workbench/api/node/extHostConfiguration.ts index a40831278fc..e7fa2a2066c 100644 --- a/src/vs/workbench/api/node/extHostConfiguration.ts +++ b/src/vs/workbench/api/node/extHostConfiguration.ts @@ -132,8 +132,8 @@ export class ExtHostConfiguration implements ExtHostConfigurationShape { const scope = this._configurationScopes.get(key); const extensionIdText = extensionId ? `[${extensionId}] ` : ''; if (ConfigurationScope.RESOURCE === scope) { - if (!resource) { - console.warn(`${extensionIdText}Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '${key}', provide the resource for which the value is needed. If you would like to look up all values, use 'inspect' method instead.`); + if (resource === void 0) { + console.warn(`${extensionIdText}Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '${key}', provide the URI of a resource or 'null' for any resource.`); } return; }