Skip to content

Commit

Permalink
Merge pull request #10 from j13leach/master
Browse files Browse the repository at this point in the history
Handle Nullable types
  • Loading branch information
morrisjdev authored Oct 29, 2019
2 parents c5bdab8 + c74148f commit 2bcdac4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions FileContextCore/Serializer/SerializerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ static class SerializerHelper
{
public static object Deserialize(this string input, Type type)
{
type = Nullable.GetUnderlyingType(type) ?? type;

if (String.IsNullOrEmpty(input))
return type.GetDefaultValue();

Expand Down

0 comments on commit 2bcdac4

Please sign in to comment.