Skip to content

Commit

Permalink
Fix opening single files
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeoneToIgnore authored and matklad committed May 31, 2021
1 parent f438398 commit 28e32fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editors/code/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit 28e32fe

Please sign in to comment.