Skip to content

Commit

Permalink
Fix #653 - Check for null 'allowedContentTypes' (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJump authored Jun 24, 2024
1 parent 9f51c7f commit 2c8b828
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ protected XElement SerializeStructure(TObject item)
var node = new XElement("Structure");
List<KeyValuePair<string, string>> items = new List<KeyValuePair<string, string>>();

if (item.AllowedContentTypes is null) return node;

foreach (var allowedType in item.AllowedContentTypes.OrderBy(x => x.SortOrder))
{
var allowedItem = FindItem(allowedType.Id.Value);
Expand Down

0 comments on commit 2c8b828

Please sign in to comment.