Skip to content

Commit

Permalink
Fix handling of empty CSV files
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Käser committed Aug 20, 2019
1 parent 5645820 commit 1791541
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions FileContextCore/Serializer/CSVSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ public CSVSerializer(IEntityType _entityType)

public Dictionary<TKey, object[]> Deserialize<TKey>(string list, Dictionary<TKey, object[]> newList)
{
if (string.IsNullOrEmpty(list))
{
return new Dictionary<TKey, object[]>();
}

TextReader tr = new StringReader(list);
CsvReader reader = new CsvReader(tr);

Expand Down

0 comments on commit 1791541

Please sign in to comment.