Skip to content

Commit

Permalink
Minor change in check category availability method
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanovM committed Jul 4, 2022
1 parent 6e5f03f commit 6892ba1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Presentation/Nop.Web/Controllers/CatalogController.cs
Expand Up @@ -457,9 +457,12 @@ public virtual async Task<IActionResult> SearchProducts(SearchModel searchModel,

private async Task<bool> CheckCategoryAvailabilityAsync(Category category)
{
if (category is null)
return false;

var isAvailable = true;

if (category == null || category.Deleted)
if (category.Deleted)
isAvailable = false;

var notAvailable =
Expand Down

0 comments on commit 6892ba1

Please sign in to comment.