Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ private void MapBlockItemDataFromEditor(List<BlockItemData> items)

TValue? mergedBlockValue =
MergeVariantInvariantPropertyValueTyped(source, target, canUpdateInvariantData, allowedCultures);
if (mergedBlockValue is null)
{
return null;
}

return _jsonSerializer.Serialize(mergedBlockValue);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ public void Validates_Number_Of_Items_Is_Less_Than_Or_Equal_To_Configured_Max(in
}
}

[Test]
public void MergeVariantInvariantPropertyValue_Can_Merge_Null_Values()
{
var editor = CreateValueEditor();
var result = editor.MergeVariantInvariantPropertyValue(null, null, true, ["en-US"]);
Comment thread
AndyButland marked this conversation as resolved.
Assert.IsNull(result);
}

private static JsonObject CreateBlocksJson(int numberOfBlocks)
{
var layoutItems = new JsonArray();
Expand Down