fix: sort by not using relevance as default type (#5872)

This commit is contained in:
Truman Gao
2026-04-20 14:34:40 -06:00
committed by GitHub
parent da47c50320
commit 694ab09a01
3 changed files with 4 additions and 3 deletions

View File

@@ -276,7 +276,9 @@ export function useBrowseSearch(options: UseBrowseSearchOptions): BrowseSearchSt
() => options.projectType.value,
(newType, oldType) => {
debug('projectType changed', { from: oldType, to: newType })
currentSortType.value = { display: 'Relevance', name: 'relevance' }
effectiveCurrentSortType.value =
effectiveSortTypes.value.find((sortType) => sortType.name === 'relevance') ??
effectiveSortTypes.value[0]
query.value = ''
},
)