Browse Source

Small perf improvement in LINQ

Antony Corbett 2 years ago
parent
commit
e1e5778ff0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/QuestPDF/Infrastructure/PageContext.cs

+ 1 - 1
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);
         }
     }
 }