From 3eeceb5c14921fadacb12ff89e2c2b09f1832695 Mon Sep 17 00:00:00 2001 From: "lucas.mathieu" Date: Fri, 18 Dec 2020 18:49:41 +0100 Subject: [PATCH] Fixed a bug where multiple texts were not showing if in a link --- genius.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/genius.js b/genius.js index 4f5247b..bd88f74 100644 --- a/genius.js +++ b/genius.js @@ -29,7 +29,13 @@ class Genius { let lyrics; texts.forEach(element => { if (element.type === 'text') lyrics += element.data; - else if (element.children[0]) lyrics += element.children[0].data; + else if (element.children[0]) { + element.children.forEach(children => { + if (children.data) lyrics += children.data; + }); + } + + //else if (element.children[0]) lyrics += element.children[0].data; }); return callback(null, lyrics); }).catch(err => {