Skip to content

Commit

Permalink
Fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaapple committed Oct 31, 2024
1 parent 82b3a30 commit d062211
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/lib/search/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ export function getSearchEngine(options: SearchOptions = {}): SearchSource {
const categoryEngines: Record<string, () => SearchSource> = {
[SearchCategory.ALL]: () => new SerperSearch(options),
[SearchCategory.TWEET]: () => new SerperSearch({ ...options, domains: ['x.com'] }),
[SearchCategory.ACADEMIC]: () => new EXASearch({ ...options, categories: ['research paper'] })
[SearchCategory.ACADEMIC]: () => new EXASearch({ ...options, categories: ['research paper'] }),
};

const matchedCategory = categories.find(category => category in categoryEngines);
const matchedCategory = categories.find((category) => category in categoryEngines);

return categoryEngines[matchedCategory || SearchCategory.ALL](options);
return categoryEngines[matchedCategory || SearchCategory.ALL]();
}

0 comments on commit d062211

Please sign in to comment.