diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-31 18:38:15 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-31 18:38:15 +0000 |
| commit | a127b10d0087c19c299ccfcb5b9f3af4615411f8 (patch) | |
| tree | 3f6dd5bb4992b999a8cc2ed13d9ad827c9cba568 /editors/code | |
| parent | 7c1d8ca63510bb719fd91bbf38692e45b19c04d6 (diff) | |
| parent | 60e7817e9cc27e41c0dd4720d41feb74cf2eb989 (diff) | |
| download | rust-a127b10d0087c19c299ccfcb5b9f3af4615411f8.tar.gz rust-a127b10d0087c19c299ccfcb5b9f3af4615411f8.zip | |
Merge #9091
9091: Fix opening single files r=SomeoneToIgnore a=SomeoneToIgnore Closes https://github.com/rust-analyzer/rust-analyzer/issues/9082 Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Diffstat (limited to 'editors/code')
| -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 }); |
