core: fix Cannot read properties of undefined (reading 'length') error

This commit is contained in:
Abdullah Atta
2023-07-05 22:19:43 +05:00
parent 35a37458e4
commit 111c7ef954

View File

@@ -44,6 +44,7 @@ function wrapIntoHTMLDocument(input) {
export function extractFirstParagraph(html) {
let text = "";
try {
let start = false;
const parser = new Parser(
{
@@ -67,5 +68,6 @@ export function extractFirstParagraph(html) {
}
);
parser.end(html);
} catch (e) {}
return text;
}