fix(code search): empty mode dropdown when keyword is empty

(cherry picked from commit c53d21965a)
This commit is contained in:
Shiny Nematoda 2025-01-01 12:32:41 +00:00 committed by forgejo-backport-action
parent 86a09562fd
commit c7c7f69f82
2 changed files with 7 additions and 3 deletions

View file

@ -78,6 +78,7 @@ func testSearchRepo(t *testing.T, indexer bool) {
code_indexer.UpdateRepoIndexer(repo)
}
testSearch(t, "/user2/glob/search?q=", []string{}, indexer)
testSearch(t, "/user2/glob/search?q=loren&page=1", []string{"a.txt"}, indexer)
testSearch(t, "/user2/glob/search?q=loren&page=1&mode=exact", []string{"a.txt"}, indexer)