Skip to content

Commit

Permalink
fix: language features now work when there is no opened folder (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelday committed Jun 22, 2019
1 parent f9d186b commit 1aae8aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DarkId.Papyrus.Server/ProjectProgramOptionsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public ProjectProgramOptionsProvider(
public async Task<Dictionary<string, ProgramOptions>> GetProgramOptions()
{
var workspaceFolders = await Task.Run(() => _languageServer.Workspace.WorkspaceFolders().WaitForResult());
var workspaceFolderPaths = workspaceFolders.Select(f => f.Uri.ToFilePath()).ToArray();
var workspaceFolderPaths = workspaceFolders?.Select(f => f.Uri.ToFilePath()).ToArray() ?? new string[] { };

var workspaceProjectFiles = Task.WhenAll(workspaceFolderPaths.Select(async d =>
{
Expand Down

0 comments on commit 1aae8aa

Please sign in to comment.