Fixed a bug where multiple texts were not showing if in a link
This commit is contained in:
@@ -29,7 +29,13 @@ class Genius {
|
|||||||
let lyrics;
|
let lyrics;
|
||||||
texts.forEach(element => {
|
texts.forEach(element => {
|
||||||
if (element.type === 'text') lyrics += element.data;
|
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);
|
return callback(null, lyrics);
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
|||||||
Reference in New Issue
Block a user