Fixes: U4-5714 Calling Index() on IPublishedContent level 1 media fails
This commit is contained in:
@@ -1562,9 +1562,11 @@ namespace Umbraco.Web
|
||||
// what else? would need root content to have a special, non-null but hidden,
|
||||
// parent...
|
||||
|
||||
|
||||
|
||||
var siblings = content.Parent == null
|
||||
? UmbracoContext.Current.ContentCache.GetAtRoot()
|
||||
: content.Parent.Children;
|
||||
? content.ItemType == PublishedItemType.Media ? UmbracoContext.Current.MediaCache.GetAtRoot() : UmbracoContext.Current.ContentCache.GetAtRoot()
|
||||
: content.Parent.Children;
|
||||
|
||||
// make sure we run it once
|
||||
return siblings.ToArray();
|
||||
|
||||
Reference in New Issue
Block a user