From e1e5778ff068264ce42dc2926347338a917de044 Mon Sep 17 00:00:00 2001 From: Antony Corbett Date: Sun, 12 Feb 2023 14:01:41 +0000 Subject: [PATCH] Small perf improvement in LINQ --- Source/QuestPDF/Infrastructure/PageContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/QuestPDF/Infrastructure/PageContext.cs b/Source/QuestPDF/Infrastructure/PageContext.cs index 385dcfb..77ed306 100644 --- a/Source/QuestPDF/Infrastructure/PageContext.cs +++ b/Source/QuestPDF/Infrastructure/PageContext.cs @@ -39,7 +39,7 @@ namespace QuestPDF.Infrastructure public DocumentLocation? GetLocation(string name) { - return Locations.FirstOrDefault(x => x.Name == name); + return Locations.Find(x => x.Name == name); } } } \ No newline at end of file