aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2021-05-31 19:37:08 +0100
committerKirill Bulatov <[email protected]>2021-05-31 19:37:08 +0100
commit60e7817e9cc27e41c0dd4720d41feb74cf2eb989 (patch)
tree3f6dd5bb4992b999a8cc2ed13d9ad827c9cba568 /editors/code/src
parent7c1d8ca63510bb719fd91bbf38692e45b19c04d6 (diff)
Fix opening single files
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/main.ts2
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 });