Skip to content

Commit

Permalink
last segment can be null (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
basilkot authored Aug 2, 2024
1 parent 9634365 commit e0ff886
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task<SlugInfoResponse> Handle(SlugInfoQuery request, CancellationTo
var currentCulture = request.CultureName ?? store.DefaultLanguage;

var segments = request.Permalink.Split("/", StringSplitOptions.RemoveEmptyEntries);
var lastSegment = segments.Last();
var lastSegment = segments.LastOrDefault();

var criteria = AbstractTypeFactory<SeoSearchCriteria>.TryCreateInstance();
criteria.StoreId = store.Id;
Expand Down

0 comments on commit e0ff886

Please sign in to comment.