diff --git a/Source/Glass.Mapper.Sc/SitecoreVersionAbstractions.cs b/Source/Glass.Mapper.Sc/SitecoreVersionAbstractions.cs index db655a3a7..360a31ae2 100644 --- a/Source/Glass.Mapper.Sc/SitecoreVersionAbstractions.cs +++ b/Source/Glass.Mapper.Sc/SitecoreVersionAbstractions.cs @@ -35,8 +35,7 @@ public static string GetMediaUrl(MediaItem media) public static string GetItemUrl(Item item, UrlOptions urlOptions) { #if SC104 - if (item?.Paths == null) return string.Empty; - if (!item?.Paths.IsFullyQualified && item?.Parent == null) return string.Empty; + if (item?.Paths == null || (!item.Paths.IsFullyQualified && item.Parent == null)) return string.Empty; var paths = item.Paths.GetPathParts(urlOptions?.UseDisplayName == true ? ItemPathType.DisplayName : ItemPathType.Name); if (paths == null || paths.Length == 0) {