Skip to content

Commit

Permalink
Merge master into add-additional-properties
Browse files Browse the repository at this point in the history
  • Loading branch information
wynged authored Dec 13, 2023
2 parents fa49f5d + 001c0f6 commit dc5411e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Elements/src/Serialization/JSON/JsonInheritanceConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,12 @@ private System.Type GetObjectSubtype(System.Type objectType, string discriminato

// If it's not in the type cache see if it's got a representation.
// Import it as a GeometricElement.
if (jObject.TryGetValue("Representation", out _))
if (jObject.TryGetValue("Representation", out _) && discriminator != null)
{
return typeof(GeometricElement);
}
// If nothing else has worked, see if it has an ID and treat it as a generic element
if (jObject.TryGetValue("Id", out _))
if (jObject.TryGetValue("Id", out _) && discriminator != null)
{
return typeof(Element);
}
Expand Down

0 comments on commit dc5411e

Please sign in to comment.