refactor: simplify code head generation

This commit is contained in:
Lucien Cartier-Tilet 2023-05-11 00:26:24 +02:00
parent 5e9c717e1e
commit 87fcb0854c
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -118,10 +118,9 @@ const simplifiedHead = [
]; ];
let head = []; let head = [];
simplifiedHead.map((tag: SimplifiedHeader) => { simplifiedHead.forEach((tag) => {
let tagName = tag.tag; tag.content.forEach((element: any) => {
tag.content.forEach((element) => { head.push([tag.tag, element]);
head.push([tagName, element]);
}); });
}); });