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;