Skip to content

Commit 1791541

Browse files
author
Christian Käser
committed
Fix handling of empty CSV files
1 parent 5645820 commit 1791541

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

FileContextCore/Serializer/CSVSerializer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ public CSVSerializer(IEntityType _entityType)
2424

2525
public Dictionary<TKey, object[]> Deserialize<TKey>(string list, Dictionary<TKey, object[]> newList)
2626
{
27+
if (string.IsNullOrEmpty(list))
28+
{
29+
return new Dictionary<TKey, object[]>();
30+
}
31+
2732
TextReader tr = new StringReader(list);
2833
CsvReader reader = new CsvReader(tr);
2934

0 commit comments

Comments
 (0)