diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfPropertyDataSerializer.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfPropertyDataSerializer.cs index 304fc6def0..f9a44adab1 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfPropertyDataSerializer.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/BTree.DictionaryOfPropertyDataSerializer.cs @@ -11,6 +11,7 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource /// internal class DictionaryOfPropertyDataSerializer : SerializerBase, ISerializer>, IDictionaryOfPropertyDataSerializer { + private static readonly PropertyData[] Empty = Array.Empty(); public IDictionary ReadFrom(Stream stream) { // read properties count @@ -25,6 +26,11 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource // read values count var vcount = PrimitiveSerializer.Int32.ReadFrom(stream); + if(vcount == 0) + { + dict[key] = Empty; + continue; + } // create pdata and add to the dictionary var pdatas = new PropertyData[vcount];