Skip to content

Commit

Permalink
Small typo + use sharedValue and elementValue instead of getting valu…
Browse files Browse the repository at this point in the history
…e again
  • Loading branch information
katehryhorenko committed Jan 22, 2025
1 parent 69cbe69 commit 9dba881
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Elements/src/Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private class GatherSubElementsResult
/// List of elements collected from the shared object's properties.
///
/// If shared object is marked as JsonIgnore (e.g. RepresentationInstance), it will not be
/// serialized to JSON, but it's properties will be collected here so they can be used
/// serialized to JSON, but its properties will be collected here so they can be used
/// during gltf serialization.
/// </summary>
public List<Element> ElementsFromSharedObjectProperties { get; } = new List<Element>();
Expand Down
4 changes: 2 additions & 2 deletions Elements/src/Serialization/JSON/JsonInheritanceConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ private void RemovePropertiesSameAsInSharedObject(Element element, JObject jObje
// compare each value in the dictionary
else if (Attribute.IsDefined(sharedProperty, typeof(JsonExtensionDataAttribute)))
{
if (sharedProperty.GetValue(element.SharedObject) is IDictionary<string, object> extraDataFromSharedObject
&& property.GetValue(element) is IDictionary<string, object> extraDataFromElement)
if (sharedValue is IDictionary<string, object> extraDataFromSharedObject
&& elementValue is IDictionary<string, object> extraDataFromElement)
{
foreach (var extraDataFromSharedObjectKey in extraDataFromSharedObject.Keys)
{
Expand Down

0 comments on commit 9dba881

Please sign in to comment.