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;
|
||||
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 => {
|
||||
|
||||
Reference in New Issue
Block a user