diff options
| author | David Barsky <me@davidbarsky.com> | 2023-03-14 13:36:21 -0400 |
|---|---|---|
| committer | David Barsky <me@davidbarsky.com> | 2023-03-14 13:36:21 -0400 |
| commit | 6e7bc07cdf225aea811f793c2f712f25846b8d20 (patch) | |
| tree | 33fce1fb034b09d0ca79656017e19c27c09f4554 /editors/code/src/client.ts | |
| parent | bd545a1c106484aa4960737c62450927e1bd8ac7 (diff) | |
| download | rust-6e7bc07cdf225aea811f793c2f712f25846b8d20.tar.gz rust-6e7bc07cdf225aea811f793c2f712f25846b8d20.zip | |
fix: don't override `linkedProjects` if no workspace was discovered.
Diffstat (limited to 'editors/code/src/client.ts')
| -rw-r--r-- | editors/code/src/client.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index 9a576570beb..565cb9c6432 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts @@ -96,7 +96,12 @@ export async function createClient( if (resp && Array.isArray(resp)) { return resp.map((val) => { return prepareVSCodeConfig(val, (key, cfg) => { - if (key === "linkedProjects") { + // we only want to set discovered workspaces on the right key + // and if a workspace has been discovered. + if ( + key === "linkedProjects" && + config.discoveredWorkspaces.length > 0 + ) { cfg[key] = config.discoveredWorkspaces; } }); |
