diff options
| author | Kirill Bulatov <mail4score@gmail.com> | 2021-05-31 21:37:08 +0300 |
|---|---|---|
| committer | Kirill Bulatov <mail4score@gmail.com> | 2021-05-31 21:37:08 +0300 |
| commit | 60e7817e9cc27e41c0dd4720d41feb74cf2eb989 (patch) | |
| tree | 3f6dd5bb4992b999a8cc2ed13d9ad827c9cba568 /editors/code/src | |
| parent | 7c1d8ca63510bb719fd91bbf38692e45b19c04d6 (diff) | |
| download | rust-60e7817e9cc27e41c0dd4720d41feb74cf2eb989.tar.gz rust-60e7817e9cc27e41c0dd4720d41feb74cf2eb989.zip | |
Fix opening single files
Diffstat (limited to 'editors/code/src')
| -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 d26273246c9..74ee28d2457 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -45,7 +45,7 @@ async function tryActivate(context: vscode.ExtensionContext) { throw new Error(message); }); - if (vscode.workspace.workspaceFolders?.length === 0) { + if ((vscode.workspace.workspaceFolders || []).length === 0) { const rustDocuments = vscode.workspace.textDocuments.filter(document => isRustDocument(document)); if (rustDocuments.length > 0) { ctx = await Ctx.create(config, context, serverPath, { kind: 'Detached Files', files: rustDocuments }); |
