Skip to content

Commit

Permalink
fix: minor code nit
Browse files Browse the repository at this point in the history
  • Loading branch information
pomegranited committed Jul 20, 2024
1 parent 60fc5e7 commit 187ec8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/search-manager/SearchManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ export const SearchContextProvider: React.FC<{
);
// Note: SearchSortOption.RELEVANCE is special, it means "no custom sorting",
// so we send it to useContentSearchResults as an empty array.
const sort: SearchSortOption[] = (overrideSearchSortOrder && [overrideSearchSortOrder])
|| (searchSortOrder === SearchSortOption.RELEVANCE ? [] : [searchSortOrder]);
const searchSortOrderToUse = overrideSearchSortOrder ?? searchSortOrder;
const sort: SearchSortOption[] = (searchSortOrderToUse === SearchSortOption.RELEVANCE ? [] : [searchSortOrderToUse]);

const canClearFilters = blockTypesFilter.length > 0 || tagsFilter.length > 0;
const clearFilters = React.useCallback(() => {
Expand Down

0 comments on commit 187ec8f

Please sign in to comment.