diff --git a/src/engines/answer/thesaurus.rs b/src/engines/answer/thesaurus.rs index ad532aa..84bf885 100644 --- a/src/engines/answer/thesaurus.rs +++ b/src/engines/answer/thesaurus.rs @@ -50,6 +50,11 @@ pub struct ThesaurusItem { pub fn parse_response(body: &str) -> eyre::Result { let response = parse_thesaurus_com_response(body)?; + + if response.items.is_empty() { + return Ok(EngineResponse::new()); + } + let rendered_html = render_thesaurus_html(response); Ok(EngineResponse::answer_html(rendered_html))