Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Minor fix in GetViewSortSizeOptionsHandler

support7f492c0d6789
diff --git a/src/Web/Grand.Web/Features/Handlers/Catalog/GetViewSortSizeOptionsHandler.cs b/src/Web/Grand.Web/Features/Handlers/Catalog/GetViewSortSizeOptionsHandler.cs
index 0d5a7e910..b864eb1df 100644
--- a/src/Web/Grand.Web/Features/Handlers/Catalog/GetViewSortSizeOptionsHandler.cs
+++ b/src/Web/Grand.Web/Features/Handlers/Catalog/GetViewSortSizeOptionsHandler.cs
@@ -8,7 +8,6 @@ using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.AspNetCore.Mvc.Rendering;
-using NUglify.Helpers;
namespace Grand.Web.Features.Handlers.Catalog
{
@@ -181,7 +180,7 @@ namespace Grand.Web.Features.Handlers.Catalog
var currentRating = _httpContextAccessor.HttpContext?.Request.Query["rating"];
request.PagingFilteringModel.RatingOptions.Add(new SelectListItem("", ""));
_catalogSettings.FilterProductRating.Split(',', StringSplitOptions.RemoveEmptyEntries)
- .Where(x => !string.IsNullOrWhiteSpace(x)).ForEach(x =>
+ .Where(x => !string.IsNullOrWhiteSpace(x)).ToList().ForEach(x =>
request.PagingFilteringModel.RatingOptions.Add(new SelectListItem(x, x, currentRating?.ToString() == x)));
}
}