From ead3e2373df23df1bb4301937a5dcab345a34789 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 23 Jan 2020 10:01:06 -0800 Subject: [PATCH] Correctly convert `null` to a resource scope (#89131) For #87768 I believe that calling `vscode.workspace.getConfiguration('section', null)` is supposed to create a specific config accessor that works for any resource. Currently it behaves the same as if you omitted the second param --- src/vs/workbench/api/common/extHostConfiguration.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/workbench/api/common/extHostConfiguration.ts b/src/vs/workbench/api/common/extHostConfiguration.ts index b4aad76159e..6042075bc00 100644 --- a/src/vs/workbench/api/common/extHostConfiguration.ts +++ b/src/vs/workbench/api/common/extHostConfiguration.ts @@ -85,6 +85,9 @@ function scopeToOverrides(scope: vscode.ConfigurationScope | undefined | null): if (isWorkspaceFolder(scope)) { return { resource: scope.uri }; } + if (scope === null) { + return { resource: null }; + } return undefined; }