Refactor IPublishedContent.ItemType
This commit is contained in:
@@ -280,9 +280,6 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override PublishedItemType ItemType => _contentNode.ContentType.ItemType;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool IsDraft(string culture = null)
|
||||
{
|
||||
@@ -421,7 +418,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
var publishedSnapshot = (PublishedSnapshot)_publishedSnapshotAccessor.PublishedSnapshot;
|
||||
var cache = publishedSnapshot == null
|
||||
? null
|
||||
: ((IsPreviewing == false || PublishedSnapshotService.FullCacheWhenPreviewing) && (ItemType != PublishedItemType.Member)
|
||||
: ((IsPreviewing == false || PublishedSnapshotService.FullCacheWhenPreviewing) && (ContentType.ItemType != PublishedItemType.Member)
|
||||
? publishedSnapshot.ElementsCache
|
||||
: publishedSnapshot.SnapshotCache);
|
||||
return cache;
|
||||
|
||||
Reference in New Issue
Block a user