Skip to content

Commit

Permalink
Clear out parent node value when saving collection type
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyCushnie committed Apr 12, 2024
1 parent 59d076c commit fb7300c
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public static bool IsSupportedType(Type collectionType)

public static void SetCollectionNode(Node node, object data, Type collectionType, FileStyle style)
{
// Collection nodes cannot have a value. Clear it if it's been set.
if (node.HasValue)
node.ClearValue();


if (Arrays.IsArrayType(collectionType))
Arrays.SetArrayNode(node, data, collectionType, style);

Expand Down

0 comments on commit fb7300c

Please sign in to comment.