diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/src/main.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index d26273246..74ee28d24 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts | |||
@@ -45,7 +45,7 @@ async function tryActivate(context: vscode.ExtensionContext) { | |||
45 | throw new Error(message); | 45 | throw new Error(message); |
46 | }); | 46 | }); |
47 | 47 | ||
48 | if (vscode.workspace.workspaceFolders?.length === 0) { | 48 | if ((vscode.workspace.workspaceFolders || []).length === 0) { |
49 | const rustDocuments = vscode.workspace.textDocuments.filter(document => isRustDocument(document)); | 49 | const rustDocuments = vscode.workspace.textDocuments.filter(document => isRustDocument(document)); |
50 | if (rustDocuments.length > 0) { | 50 | if (rustDocuments.length > 0) { |
51 | ctx = await Ctx.create(config, context, serverPath, { kind: 'Detached Files', files: rustDocuments }); | 51 | ctx = await Ctx.create(config, context, serverPath, { kind: 'Detached Files', files: rustDocuments }); |