prevent double lookup

This commit is contained in:
Antony Corbett
2023-02-03 15:10:57 +00:00
parent 30bd7420e2
commit 5fd72cbb4b
+1 -1
View File
@@ -80,7 +80,7 @@ namespace QuestPDF.Elements.Table
CellsCache = Enumerable
.Range(0, MaxRow + 1)
.Select(x => groups.ContainsKey(x) ? groups[x] : Array.Empty<TableCell>())
.Select(x => groups.TryGetValue(x, out var value) ? value : Array.Empty<TableCell>())
.ToArray();
}