Skip to content

Commit

Permalink
Find first potential editorconfig when trying to synchronize (#74986)
Browse files Browse the repository at this point in the history
Probably fixes a lot of reports of #54556
  • Loading branch information
ryzngard authored Sep 4, 2024
1 parent 7831d50 commit 979d7b2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ internal void SynchronizeSettings()

var solution = _workspace.CurrentSolution;
var analyzerConfigDocument = solution.Projects
.Select(p => p.TryGetExistingAnalyzerConfigDocumentAtPath(_filepath)).FirstOrDefault();
.Select(p => p.TryGetExistingAnalyzerConfigDocumentAtPath(_filepath))
.WhereNotNull()
.FirstOrDefault();

if (analyzerConfigDocument is null)
{
return;
Expand Down

0 comments on commit 979d7b2

Please sign in to comment.