Skip to content

Commit

Permalink
Fix #653 - Check for null 'allowedContentTypes'
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJump committed Jun 21, 2024
1 parent 9f51c7f commit 534ee84
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 534ee84

Please sign in to comment.