include full link in getEventLinks

This commit is contained in:
Clarence Chan committed 2023-09-13 11:36:40 -04:00
1 parent 3fd0988a82
commit e061a82cbc
1 file changed
+3 -1
+3 -1
View File
@@ -9,7 +9,9 @@ async function getEventLinks() {
let links = root.querySelectorAll( let links = root.querySelectorAll(
"#events-list-upcoming h3.c-card-event--result__headline" "#events-list-upcoming h3.c-card-event--result__headline"
); );
links = links.map((html) => html.firstChild.getAttribute("href")); links = links.map(
(html) => "https://www.ufc.com" + html.firstChild.getAttribute("href")
);
return links; return links;
} catch (error) { } catch (error) {
console.error(error); console.error(error);