[dyad] Fixing build error in headline extraction - wrote 1 file(s)
This commit is contained in:
@@ -134,7 +134,9 @@ export async function extractMetaData(url: string, keyword?: string) {
|
|||||||
const path: HeadlineNode[] = [];
|
const path: HeadlineNode[] = [];
|
||||||
|
|
||||||
$("h1, h2, h3, h4, h5, h6").each((i, el) => {
|
$("h1, h2, h3, h4, h5, h6").each((i, el) => {
|
||||||
const tag = $(el).prop("tagName").toLowerCase();
|
const tagName = $(el).prop("tagName");
|
||||||
|
if (!tagName) return;
|
||||||
|
const tag = tagName.toLowerCase();
|
||||||
const text = $(el).text().trim();
|
const text = $(el).text().trim();
|
||||||
if (!text) return;
|
if (!text) return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user