Skip to content

Commit

Permalink
Update CSVParser.GridToStringEnumerable to handle nulls
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowFoxNixill committed Jan 16, 2020
1 parent 635f2f1 commit c49af82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CS-NixLib/src/Grid/CSVParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public static IEnumerable<string> GridToStringEnumerable<T>(IGrid<T> input) {
foreach (GridLine<T> line in input) {
StringBuilder ret = new StringBuilder();
foreach (T obj in line) {
ret.Append("," + CSVEscape(obj.ToString()));
ret.Append("," + CSVEscape(obj?.ToString() ?? ""));
}
if (ret.Length > 0) ret.Remove(0, 1);
yield return ret.ToString();
Expand Down

0 comments on commit c49af82

Please sign in to comment.