Skip to content

Commit d23eb35

Browse files
author
Claus
committed
adding comment.
1 parent 5fed14f commit d23eb35

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Umbraco.Deploy.Contrib.Connectors/ValueConnectors/NestedContentValueConnector.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,11 @@ public void SetValue(IContentBase content, string alias, string value)
247247
}
248248
}
249249

250-
// NestedContent does not use formatting when serializing JSON values
250+
// This statement checks whether we have a single item being stored - and if this is stored inside a LeBlender value.
251+
// For some reason, LeBlender does not store an array of one object (like normal Nested Content would do) if the Nested
252+
// Content is inside a LeBlender property. Instead it simply stores an object - therefore we need to save single items
253+
// using JObject instead of JArray, if the current operation is being run from within a wrapping LeBlender property.
254+
// Note: NestedContent does not use formatting when serializing JSON values.
251255
if (nestedContent.Length == 1 && content.Properties[0]?.Alias == LeBlenderGridCellValueConnector.MockPropertyTypeAlias)
252256
value = JObject.FromObject(nestedContent.FirstOrDefault()).ToString(Formatting.None);
253257
else

0 commit comments

Comments
 (0)