From b0d40bff96f7c0866f72a5b25c600255fbab95a0 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Fri, 12 Oct 2018 00:57:36 +0000 Subject: [PATCH] Fix --- commands/search/mayo-clinic.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/search/mayo-clinic.js b/commands/search/mayo-clinic.js index 6a46167e..33156a23 100644 --- a/commands/search/mayo-clinic.js +++ b/commands/search/mayo-clinic.js @@ -54,12 +54,12 @@ module.exports = class MayoClinicCommand extends Command { async fetchDisease(location) { const { text } = await request.get(location); const $ = cheerio.load(text); - const overview = $('h2').first().text() === 'Overview'; - if (overview) { + const header = $('h2').first(); + if (header.text() === 'Overview') { return { name: $('h1').first().text().trim(), url: location, - description: overview.next().text() + description: header.next().text() }; } return location;