From ad0582a5aa087bf379a219bd5b8b150405dca771 Mon Sep 17 00:00:00 2001 From: Nikolai Emil Damm Date: Thu, 10 Nov 2022 14:13:10 +0100 Subject: [PATCH] Remove nullability from AdditionalData on ContentItemDisplay (#13380) @Zeegaan We have a use case where we need to set a value in the AdditionalData dictionary in a NotificationHandler, but as it can be null, it requires reflection to make sure that is not the case. As such, it would be nice if the following change could be implemented to ensure it is never null. --- src/Umbraco.Core/Models/ContentEditing/ContentItemDisplay.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentItemDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/ContentItemDisplay.cs index eb800791a2..d1a8d10970 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentItemDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentItemDisplay.cs @@ -201,7 +201,7 @@ public class ContentItemDisplay : /// [DataMember(Name = "metaData")] [ReadOnly(true)] - public IDictionary? AdditionalData { get; private set; } + public IDictionary AdditionalData { get; private set; } = new Dictionary(); /// /// This is used for validation of a content item.