fix: page content not saved when title is empty but content is not

This commit is contained in:
Hongbo Wu
2024-01-23 16:47:42 +08:00
parent afbcd2f02e
commit 94dd4be659

View File

@ -154,7 +154,7 @@ export const fetchContent = async (
let context: BrowserContext | undefined,
page: Page | undefined,
title = '',
title: string | undefined,
content: string | undefined,
contentType: string | undefined,
readabilityResult: Readability.ParseResult | null | undefined
@ -214,7 +214,7 @@ export const fetchContent = async (
const sbResult = await fetchContentWithScrapingBee(url)
title = sbResult.title
content = sbResult.domContent
} else if (result.title && result.domContent) {
} else {
title = result.title
content = result.domContent
}