diff --git a/src/Geta.EPi.Extensions/SingletonPage/Extensions.cs b/src/Geta.EPi.Extensions/SingletonPage/Extensions.cs index a319323..639e88b 100644 --- a/src/Geta.EPi.Extensions/SingletonPage/Extensions.cs +++ b/src/Geta.EPi.Extensions/SingletonPage/Extensions.cs @@ -10,7 +10,7 @@ namespace Geta.EPi.Extensions.SingletonPage /// public static class Extensions { - private static readonly IContentReferenceCache DefaultContentReferenceCache + private static readonly IContentReferenceCache DefaultContentReferenceCache = new DefaultContentReferenceCache(); /// @@ -46,7 +46,7 @@ public static T GetSingletonPage(this ContentReference rootPageLink) where T : PageData, new() { var singletonLink = Cache.GetOrAdd(new CacheKey(typeof(T), rootPageLink), rootPageLink.GetSingletonPageLink); - return ContentLoader.Get(singletonLink); + return singletonLink != ContentReference.EmptyReference ? ContentLoader.Get(singletonLink) : null; } ///