Skip to content

Commit

Permalink
added null check
Browse files Browse the repository at this point in the history
  • Loading branch information
girishsharma008 committed Jul 3, 2024
1 parent a80466d commit b0345dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Glass.Mapper.Sc/SitecoreVersionAbstractions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static string GetItemUrl(Item item, UrlOptions urlOptions)
//Added check for when rendering paramater request comes as Sitecore.Links.UrlBuilders.Helpers.ItemPathBuilder.GetRelativePath
//implementation has been changed in Sitecore 10.4
//below changes will return only url when requested for a item
if (item.Name == renderingParamKey)
if (item != null && item.Name != null && item.Name == renderingParamKey)
{
return "/renderingparameters";
}
Expand Down

0 comments on commit b0345dd

Please sign in to comment.