Skip to content

Commit 979d7b2

Browse files
author
Andrew Hall
authored
Find first potential editorconfig when trying to synchronize (#74986)
Probably fixes a lot of reports of #54556
1 parent 7831d50 commit 979d7b2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/VisualStudio/Core/Def/EditorConfigSettings/SettingsEditorControl.xaml.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ internal void SynchronizeSettings()
8282

8383
var solution = _workspace.CurrentSolution;
8484
var analyzerConfigDocument = solution.Projects
85-
.Select(p => p.TryGetExistingAnalyzerConfigDocumentAtPath(_filepath)).FirstOrDefault();
85+
.Select(p => p.TryGetExistingAnalyzerConfigDocumentAtPath(_filepath))
86+
.WhereNotNull()
87+
.FirstOrDefault();
88+
8689
if (analyzerConfigDocument is null)
8790
{
8891
return;

0 commit comments

Comments
 (0)