Skip to content

Commit e602d1d

Browse files
authored
Update SerializerHelper.cs
Fix nullable guid issue
1 parent c5bdab8 commit e602d1d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

FileContextCore/Serializer/SerializerHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ public static object Deserialize(this string input, Type type)
1818

1919
if (type == typeof(TimeSpan))
2020
return TimeSpan.Parse(input, CultureInfo.InvariantCulture);
21-
else if (type == typeof(Guid))
21+
else if (type == typeof(Guid)
22+
|| Nullable.GetUnderlyingType(type) == typeof(Guid))
2223
return Guid.Parse(input);
2324
else if (type.IsArray)
2425
{

0 commit comments

Comments
 (0)