From e8195bfff05af636d15e350ec39a9b49091d5b6f Mon Sep 17 00:00:00 2001 From: nzdev <834725+nzdev@users.noreply.github.com> Date: Tue, 24 Nov 2020 10:10:38 +1300 Subject: [PATCH] fix deserialization order --- .../MsgPackContentNestedDataSerializer.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/MsgPackContentNestedDataSerializer.cs b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/MsgPackContentNestedDataSerializer.cs index aad337b236..42468ad930 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/DataSource/MsgPackContentNestedDataSerializer.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/DataSource/MsgPackContentNestedDataSerializer.cs @@ -48,7 +48,13 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource public ContentCacheDataModel Deserialize(int contentTypeId, string stringData, byte[] byteData) { - if (stringData != null) + if (byteData != null) + { + var content = MessagePackSerializer.Deserialize(byteData, _options); + Expand(contentTypeId, content); + return content; + } + else if (stringData != null) { // NOTE: We don't really support strings but it's possible if manually used (i.e. tests) var bin = Convert.FromBase64String(stringData); @@ -56,12 +62,6 @@ namespace Umbraco.Web.PublishedCache.NuCache.DataSource Expand(contentTypeId, content); return content; } - else if (byteData != null) - { - var content = MessagePackSerializer.Deserialize(byteData, _options); - Expand(contentTypeId, content); - return content; - } else { return null;