From e390820f2e1719c54d3521a77a8201b4d5062ed2 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 30 Jul 2020 13:40:12 +0200 Subject: [PATCH] Remove redundant check --- src/Umbraco.Web/Models/Mapping/EntityMapDefinition.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web/Models/Mapping/EntityMapDefinition.cs b/src/Umbraco.Web/Models/Mapping/EntityMapDefinition.cs index 8ac8b50b86..1c4ca6087c 100644 --- a/src/Umbraco.Web/Models/Mapping/EntityMapDefinition.cs +++ b/src/Umbraco.Web/Models/Mapping/EntityMapDefinition.cs @@ -41,7 +41,7 @@ namespace Umbraco.Web.Models.Mapping target.Path = source.Path; target.Trashed = source.Trashed; target.Udi = Udi.Create(ObjectTypes.GetUdiType(source.NodeObjectType), source.Key); - + if (source is IContentEntitySlim contentSlim) { @@ -188,10 +188,7 @@ namespace Umbraco.Web.Models.Mapping if (source.Values.TryGetValue(UmbracoExamineIndex.UmbracoFileFieldName, out var umbracoFile) && umbracoFile.IsNullOrWhiteSpace() == false) { - if (umbracoFile != null) - { - target.Name = $"{target.Name} ({umbracoFile})"; - } + target.Name = $"{target.Name} ({umbracoFile})"; } if (source.Values.ContainsKey(UmbracoExamineIndex.NodeKeyFieldName)) @@ -247,7 +244,7 @@ namespace Umbraco.Web.Models.Mapping return memberEntity.ContentTypeIcon.IfNullOrWhiteSpace(Constants.Icons.Member); case IContentEntitySlim contentEntity: // NOTE: this case covers both content and media entities - return contentEntity.ContentTypeIcon; + return contentEntity.ContentTypeIcon; } return null;