patch around Abstract for DDG

This commit is contained in:
John Facey
2021-12-23 23:11:58 -06:00
parent 22bc43e894
commit f8ff15a018
2 changed files with 2 additions and 2 deletions

View File

@@ -95,7 +95,7 @@ exports.getAnswer = async function (question) {
console.log(response.data.RelatedTopics[0].Text);
console.log(response.data.RelatedTopics[0].FirstURL);
if (response.data.Entity == "company") {
if (response.data.Abstract != "") {
answerData = {
text: `${unescape(response.data.Abstract)}`,
source: `${unescape(response.data.AbstractSource)}`