Skip to content

Commit

Permalink
<Version>1.8.0</Version>
Browse files Browse the repository at this point in the history
  • Loading branch information
manuc66 committed Sep 23, 2020
1 parent 8d230a5 commit d011a77
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion JsonSubTypes/JsonSubtypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,12 @@ private Type GetTypeByPropertyPresence(JObject jObject, Type parentType)
return types[0];
}

throw new JsonSerializationException("Ambiguous type resolution, expected only one type but got: " + String.Join(", ", types.Select(t => t.FullName).ToArray()));
if (types.Length > 1)
{
throw new JsonSerializationException("Ambiguous type resolution, expected only one type but got: " + String.Join(", ", types.Select(t => t.FullName).ToArray()));
}

return null;
}

internal virtual Dictionary<string, Type> GetTypesByPropertyPresence(Type parentType)
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ deploy:
name: NuGet
server: https://www.nuget.org/api/v2/package
api_key:
secure: I8mGPBaVaAK9e3mBzOBoqQLdPckvVYvSJqFc2BE7/P7UF3P3OqHkxUAa1/PAARuy
secure: 4wUUSJDIizwaq589KK4QP19eqTHXvBNzbqIX9ekT2hzrUet4gPtDl3A+f+PQMjBA
artifact: /JsonSubTypes.*\.nupkg/
on:
branch: master

0 comments on commit d011a77

Please sign in to comment.