Browse Source

Merge pull request #489 from AntonyCorbett/perf_linq_02

Small perf improvement in LINQ (2)
Marcin Ziąbek 2 years ago
parent
commit
ad5e8ab27d
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)
         public DocumentLocation? GetLocation(string name)
         {
         {
-            return Locations.FirstOrDefault(x => x.Name == name);
+            return Locations.Find(x => x.Name == name);
         }
         }
     }
     }
 }
 }