diff --git a/public/components/query_compare/search_result/index.tsx b/public/components/query_compare/search_result/index.tsx index a0d058f..e9a65d3 100644 --- a/public/components/query_compare/search_result/index.tsx +++ b/public/components/query_compare/search_result/index.tsx @@ -104,10 +104,15 @@ export const SearchResult = ({ http }: SearchResultProps) => { body: JSON.stringify(requestBody), }) .then((res) => { - setQueryResult1(res.result1); - updateComparedResult1(res.result1); - setQueryResult2(res.result2); - updateComparedResult2(res.result2); + if (res.result1) { + setQueryResult1(res.result1); + updateComparedResult1(res.result1); + } + + if (res.result2) { + setQueryResult2(res.result2); + updateComparedResult2(res.result2); + } if (res.errorMessage1) { setQueryError1({