Open scleaver opened 1 year ago
Take a look at the Content data of your ContentItem. This is what that GetAnchors method does:
/// <summary>
/// Anchors are a less well known property of a media field.
/// </summary>
public static Anchor[] GetAnchors(this MediaField mediaField)
{
var anchors = mediaField.Content["Anchors"] as JArray;
return anchors != null ? anchors.ToObject<Anchor[]>() : Array.Empty<Anchor>();
}
You need to take a look at the contentItem before doing contentItem.As<EpisodePart>();
and compare if the MediaField.Content is there. Else, it looks like a bug.
Describe the bug
GetAnchors() always seems to be null when you have extracted a MediaField from a ContentItem.
To Reproduce
Expected behavior
I would expect to see GetAnchors() working in cases 1 & 2 - perhaps I am doing something wrong?