Fixed a bug where multiple texts were not showing if in a link

This commit is contained in:
2020-12-18 18:49:41 +01:00
parent b20321c90d
commit 3eeceb5c14

View File

@@ -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 => {