From d0622115054baf0197d7070a7dc3ad4ba5b64a39 Mon Sep 17 00:00:00 2001 From: ahaapple Date: Thu, 31 Oct 2024 16:05:31 +0800 Subject: [PATCH] Fix compile --- frontend/lib/search/search.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/lib/search/search.ts b/frontend/lib/search/search.ts index 3f159cad..62f9c6fd 100644 --- a/frontend/lib/search/search.ts +++ b/frontend/lib/search/search.ts @@ -52,10 +52,10 @@ export function getSearchEngine(options: SearchOptions = {}): SearchSource { const categoryEngines: Record 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](); }