From d5e85604933539f2b5255bb44bce531f42995eb0 Mon Sep 17 00:00:00 2001 From: Manish Vasani Date: Tue, 22 Sep 2020 14:16:18 -0700 Subject: [PATCH] Simplify --- src/Workspaces/Core/Portable/Diagnostics/DiagnosticData.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Workspaces/Core/Portable/Diagnostics/DiagnosticData.cs b/src/Workspaces/Core/Portable/Diagnostics/DiagnosticData.cs index 553f300b0e0..4fd86b4dd09 100644 --- a/src/Workspaces/Core/Portable/Diagnostics/DiagnosticData.cs +++ b/src/Workspaces/Core/Portable/Diagnostics/DiagnosticData.cs @@ -452,10 +452,8 @@ private static ImmutableArray GetAdditionalLocations(Tex } else if (location.Kind == LocationKind.ExternalFile) { - if (document.Project.GetDocumentForExternalLocation(location) is { } textDocumentId) - { - builder.AddIfNotNull(CreateLocation(document.Project.GetTextDocument(textDocumentId), location)); - } + var textDocumentId = document.Project.GetDocumentForExternalLocation(location); + builder.AddIfNotNull(CreateLocation(document.Project.GetTextDocument(textDocumentId), location)); } } -- GitLab