Remove redundant check

This commit is contained in:
Sebastiaan Janssen
2020-07-30 13:40:12 +02:00
parent 9e110124b5
commit e390820f2e

View File

@@ -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;