about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/client.ts7
-rw-r--r--editors/code/src/ctx.ts4
2 files changed, 9 insertions, 2 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;
                                 }
                             });
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts
index ca30d239c95..ffcfb810a24 100644
--- a/editors/code/src/ctx.ts
+++ b/editors/code/src/ctx.ts
@@ -205,7 +205,9 @@ export class Ctx {
             const initializationOptions = prepareVSCodeConfig(
                 rawInitializationOptions,
                 (key, obj) => {
-                    if (key === "linkedProjects") {
+                    // we only want to set discovered workspaces on the right key
+                    // and if a workspace has been discovered.
+                    if (key === "linkedProjects" && this.config.discoveredWorkspaces.length > 0) {
                         obj["linkedProjects"] = this.config.discoveredWorkspaces;
                     }
                 }