Add default value for image text

2.0.0-ts
MillenniumEarl 2021-03-19 17:19:39 +01:00
parent be246d50b1
commit 532fd8cb8c
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ function parseCheerioLinkNode(element: cheerio.Cheerio): ILink {
if (element.is("img")) { if (element.is("img")) {
link.type = "Image"; link.type = "Image";
link.text = element.attr("alt"); link.text = element.attr("alt") ?? "";
link.href = element.attr("data-src"); link.href = element.attr("data-src");
} else if (element.is("a")) { } else if (element.is("a")) {
link.type = "Link"; link.type = "Link";