fix(crawl-status): handle null data when purging rawHtml

This commit is contained in:
Gergo Moricz 2024-08-30 20:40:45 +02:00
parent 4f92bb4bf4
commit c8e0bb93ea

View File

@ -103,7 +103,9 @@ export async function crawlStatusController(req: RequestWithAuth<CrawlStatusPara
if (data.length > 0) {
if (!doneJobs[0].data.pageOptions.includeRawHtml) {
for (let ii = 0; ii < doneJobs.length; ii++) {
delete data[ii].rawHtml;
if (data[ii]) {
delete data[ii].rawHtml;
}
}
}
}