Skip to content

Commit a127b10

Browse files
Merge #9091
9091: Fix opening single files r=SomeoneToIgnore a=SomeoneToIgnore Closes #9082 Co-authored-by: Kirill Bulatov <[email protected]>
2 parents 7c1d8ca + 60e7817 commit a127b10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

editors/code/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async function tryActivate(context: vscode.ExtensionContext) {
4545
throw new Error(message);
4646
});
4747

48-
if (vscode.workspace.workspaceFolders?.length === 0) {
48+
if ((vscode.workspace.workspaceFolders || []).length === 0) {
4949
const rustDocuments = vscode.workspace.textDocuments.filter(document => isRustDocument(document));
5050
if (rustDocuments.length > 0) {
5151
ctx = await Ctx.create(config, context, serverPath, { kind: 'Detached Files', files: rustDocuments });

0 commit comments

Comments
 (0)