diff options
author | Kirill Bulatov <[email protected]> | 2021-05-31 19:37:08 +0100 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2021-05-31 19:37:08 +0100 |
commit | 60e7817e9cc27e41c0dd4720d41feb74cf2eb989 (patch) | |
tree | 3f6dd5bb4992b999a8cc2ed13d9ad827c9cba568 /editors | |
parent | 7c1d8ca63510bb719fd91bbf38692e45b19c04d6 (diff) |
Fix opening single files
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 }); |