From 2da83ede48f69b413884e8b5f1cd0f67d3905df1 Mon Sep 17 00:00:00 2001 From: leekelleher Date: Thu, 5 Apr 2018 10:22:49 +0100 Subject: [PATCH] ConfigureForDisplay - removed the extra Dictionary allocation The prevalues are already a Dictionary; https://github.com/umbraco/Umbraco-CMS/blob/release-7.4.0/src/Umbraco.Core/Models/PreValueCollection.cs#L60 --- .../InnerContentPropertyValueEditorWrapper.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Our.Umbraco.InnerContent/PropertyEditors/InnerContentPropertyValueEditorWrapper.cs b/src/Our.Umbraco.InnerContent/PropertyEditors/InnerContentPropertyValueEditorWrapper.cs index 56bf6e4..185a92f 100644 --- a/src/Our.Umbraco.InnerContent/PropertyEditors/InnerContentPropertyValueEditorWrapper.cs +++ b/src/Our.Umbraco.InnerContent/PropertyEditors/InnerContentPropertyValueEditorWrapper.cs @@ -22,10 +22,9 @@ public override void ConfigureForDisplay(PreValueCollection preValues) { base.ConfigureForDisplay(preValues); - var asDictionary = preValues.PreValuesAsDictionary.ToDictionary(x => x.Key, x => x.Value.Value); - if (asDictionary.ContainsKey("hideLabel")) + if (preValues.PreValuesAsDictionary.ContainsKey("hideLabel")) { - var boolAttempt = asDictionary["hideLabel"].TryConvertTo(); + var boolAttempt = preValues.PreValuesAsDictionary["hideLabel"].Value.TryConvertTo(); if (boolAttempt.Success) { HideLabel = boolAttempt.Result;